Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 2.2.0

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)    

 [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.


 [2006-06-02 18:05 UTC] avb (Alexey Borzov)
This bug has been fixed in CVS. If this was a documentation problem, the fix will appear on by the end of next Sunday (CET). If this was a problem with the website, the change should be live shortly. Otherwise, the fix will appear in the package's next release. Thank you for the report and for helping us make PEAR better.