Req #16037 [Opn->Bgs]: Make it possible to output all menu items at once
| From: | borz_off at cs dot msu dot su | Date: | Fri, 03 Apr 2009 17:57:06 +0000 |
| Subject: | Req #16037 [Opn->Bgs]: Make it possible to output all menu items at once | ||
| References: | 1 | Groups: | php.pear.bugs |
| Request: | Send a blank email to pear-bugs+get-299@lists.php.net to get a copy of this message | ||
Edit report at http://pear.php.net/bugs/bug.php?id=16037&edit=1
ID: 16037
Updated by: borz_off@cs.msu.su
Reported By: lars at legestue dot net
Summary: Make it possible to output all menu items at once
-Status: Open
+Status: Bogus
Type: Feature/Change Request
Package: HTML_Menu
Package Version: 2.1.4
PHP Version: 5.2.5
Roadmap Versions:
New Comment:
-Status: Open
+Status: Bogus
The bug tracker is for submitting bugs and feature requests.
If you have questions about package functionality (and, judging by the
amount of question marks used, you do) you should ask them in
pear-general mailing list.
Previous Comments:
------------------------------------------------------------------------
[2009-03-16 14:06:47] lsolesen
Description:
------------
A lot of people are using nested lists to build a dropdown menu. Is it
possible to use HTML_Menu to output all the menu items as a list at once
- so you dont just get the toplevel (the sublevel is displayed if I
forceCurrentUrl(), but only for the submenu to that index)?
Also is it possible to put in some id's and classes on the outputted
menu? What I would like to be able to do is something like the expected
result.
Test script:
---------------
$data = array(
array(
'title' => 'Aktuelt',
'url' => '/aktuelt/',
'sub' => array(
array('title' => 'Nyhedsarkiv', 'url' =>
'/aktuelt/'),
array('title' => 'Tilmeld nyhedsbrev', 'url' =>
'/url/')
)
),
array(
'title' => 'Uddannelsen',
'url' => '/uddannelsen/'
)
);
$menu = new HTML_Menu($data);
$renderer = new HTML_Menu_DirectTreeRenderer();
$menu->render($renderer, 'tree');
echo $renderer->toHtml();
Expected result:
----------------
<ul id="nav">
<li><a class="hide" href="/aktuelt/">Aktuelt</a>
<ul>
<li><a href="/aktuelt/">nyhedsarkiv</a></li>
<li class="last"><a href="/url/">Tilmeld
nyhedsbrev</a></li>
</ul>
</li>
<li><a class="hide"
href="/uddannelsen/">Uddannelsen</a></li>
</ul>
------------------------------------------------------------------------
--
Edit this bug report at http://pear.php.net/bugs/bug.php?id=16037&edit=1