I have the following Python script, which works well (it gives the position of an object in the form of a "nested numbered hierarchy", 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 -------------------------------------------------------------------------------------------------------- BUT, in its present form it only works for the object which is being called directly by the user. I would like to use it also in the framework of a dtml-tree, in order to order to apply it successively to each object reached through the tree and displayed as a menu item : <dtml-tree> <dtml-var my_python_script> </dtml-tree> Of course then, "context.REQUEST.PARENTS" is not good as it applies to the main object being called, not to the successive objects which are being retrieved recursively through the dtml-tree. What should I do? How should I modify the script? Thanking you all in advance, Pierre Pierre Godefroy 52 rue des Archives 75004 PARIS FRANCE Tél. : +33 (0)1 42 74 46 05