I am reformulating an earlier e-mail, as its wording might be confusing. (I also gave it a sexier subject line... :>) I have the following Python script, which works well, thanks to an earlier suggestion made by Maik Jablonski (it gives the position of an object inside Zope folder hierarchy in the form of a "nested numbers", such as : "3.4.3.2.3") : --------------------------------------------------------------------------------------------------- from string import join res=[] lll=len(context.REQUEST.PARENTS) for i in range(lll-1): xyz=context.REQUEST.PARENTS[i].id a=context.REQUEST.PARENTS[i+1].objectIds().index(xyz) res.append('.'+str(a+1)) res.reverse() fullnumber=join(res) print fullnumber return printed -------------------------------------------------------------------------------------------------------- My problem is : how could I apply a similar mechanism for the objects displayed by a dtml-tree? I would like to have something like : 1 : title 1.1 : title 1.2 : title 2 : title 2.1 : title 2.1.1 : title 2.1.2 : title This could be obtained by : <dtml-tree branches_expr="objectValues(['Folder'])"> <dtml-var my_python_script><dtml-var title> </dtml-tree> BUT, of course then, "context.REQUEST.PARENTS" in my present script is not good as it applies to the main object being called, not to the successive folders which are being retrieved recursively through the dtml-tree. I need to access successively the PARENTS hierarchy of these objects. What should I do? Is there a solution? How should I modify the script (or the DTML-tree itself)? Thanking you all in advance, Pierre Pierre Godefroy 52 rue des Archives 75004 PARIS FRANCE Tél. : +33 (0)1 42 74 46 05