I have a tree implented on a website and am trying to count the number of nodes or children each visible branch has without you actually having to open the branch.i would like to be able to show the number of documents the branch has underneath it.my problem is that when i search the catalog for say meta-type 'material',i get the same result on all the branches.this is because i cannot distinguish between 'material' that is a child of the branch,and material under all branches.the catalog has many indexes,one being the meta-type which refers to the type of document.i need a parameter in the catalog that will exclude children found that are not connected to the relevant branch.another way i thought of doing this would be to use the tree-level attribute.i am new to zope and dtml so any help would be greatly appreciated and please excuse me if i have not explained my problem properly,if anyone needs a point clarified ,i will do so. paul dunbar. _____________________________________ Get your free E-mail at http://www.ireland.com
paul dunbar writes:
I have a tree implented on a website and am trying to count the number of nodes or children each visible branch has without you actually having to open the branch.i would like to be able to show the number of documents the branch has underneath it.my problem is that when i search the catalog for say meta-type 'material',i get the same result on all the branches.this is because i cannot distinguish between 'material' that is a child of the branch,and material under all branches. A path index (Zope 2.4 and up) could help you.
The alternative would be to use "ZopeFind" to locate an count the descendants or children. Dieter
participants (2)
-
Dieter Maurer -
paul dunbar