FAQ
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>

------------------------------------------------------------------------

Search Discussions

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouppear-bugs @
categoriesphp
postedApr 3, '09 at 5:57p
activeApr 3, '09 at 5:57p
posts1
users1
websitepear.php.net

1 user in discussion

Borz_off: 1 post

People

Translate

site design / logo © 2022 Grokbase