Re: Can I display 2 different DBNested Set/HTML_Menus on the same page?
| From: | Daniel Khan | Date: | Thu, 27 Sep 2007 12:12:49 +0000 |
| Subject: | Re: Can I display 2 different DBNested Set/HTML_Menus on the same page? | ||
| References: | 1 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-28004@lists.php.net to get a copy of this message | ||
Hello,
Mark Reynolds wrote:
I'm displaying 2 menus on the one page using DBNestedSet and HTML_Menu The first menu 'urhere' uses getAllNodes() but the second menu just uses getBranch() I can't put my finger on it, but once the getAllnodes urhere menu is displayed the data somehow carries over and populates the array of the getBranch tree menu with all nodes instead of just the sub branch. This is even though I go through the DBNested process again. It looks like I somehow need to reset the data once the first menu has been displayed.[..] getBranch() suggests that it returns the branch below the give node. DB_NestedSet supports multiple independent trees and uses the term 'branch' for such a tree and so getBranch() returns the tree where the given node is in. So if you only have one tree (branch) this means that you will always get the whole tree with getBranch(). I think what you want is getSubBranch(). Please let me know if this fixes your issue. -- Daniel Khan