| Daniel Khan 2007-09-27, 8:02 am |
| 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
|