Find depth in tree

Author Message

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.

Greetings
felix

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-

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.