Forums / Setup & design / Find depth in tree
Felix Laate
Monday 12 January 2004 6:22:50 am
Hi all!
Is there a way to fin de maximal detph in the tree-structure, either from the top or from any given node!
I need this for creating a tree-menu of a depth that covers it all.
Greetingsfelix
Publlic Relations Manager Greater Stavanger www.greaterstavanger.com
Albert Berenguer
Friday 16 January 2004 11:16:51 am
for creating the menu you can take a look at:
http://www.ez.no/developer/ez_publish_3/documentation/customization/tips_tricks/creating_tree_menus
Every node has an attribute which indicates its depth (for example $myloop:item.depth).If you have an array with all the nodes, you should look for the maximum depth of all the nodes, that will be the depth of the tree.
i hope that was what you needed, bye!
-berto-