27 Aug
2002
27 Aug
'02
12:09 p.m.
Maik Jablonski wrote:
Pierre Godefroy wrote:
Is there a simple and direct way to get the position of an object in a parent folder without iterating with a dtml-in loop through all the objects of the folder and countring until one gets to the id of the said object?
a little python-script should do this trick for you:
return context.objectIds().index('standard_html_header')
Beware that this is not guaranteed to result always the same index, as objectIds is something like dict.keys(). The order of the elements in a mapping is not fixed. HTH, __Janko