Home » HTML » HTML_Menu » Bug #4391
I would like to be able to force expansion of part of a tree.
Details
| Request #4391 | I would like to be able to force expansion of part of a tree. |
|---|---|
| Submitted | 2005-05-20 00:26 UTC |
| From | prices at dflytech dot com |
| Assigned | avb |
| Status | Closed |
| Package | HTML_Menu |
| PHP Version | 5.0.4 |
| OS | FreeBSD 5.3 |
| Roadmaps | (Not assigned) |
Comments
[2005-05-20 00:26 UTC] prices at dflytech dot com
Description:
------------
I would like to be able to force expansion of part of a tree. I have headings in my menu that don't have links and the sub menu needs to be always expanded.
Reproduce code:
---------------
in:
function _renderTree($menu, $level = 0)
...SNIP...
// follow the subtree if the active menu item is in it or if we want the full menu
if (('sitemap' == $this->_menuType || HTML_MENU_ENTRY_INACTIVE != $type || $node['forceExpand']) && isset($node['sub'])) {
$this->_renderTree($node['sub'], $level + 1);
...SNIP...
}
I added the "|| $node['forceExpand']" to force the expansion. That works well for me.