[Zope] Sort in tree tag
Lars Heber
Lars.Heber@t-systems.de
Mon, 15 Oct 2001 11:56:44 +0200
> write a small script (python),
>
> get_index
> try:
> my_index = context.index
> except:
> my_index = 0
> return my_index
> now with
> <tree .. sort=get_index>
I did it with plain DTML:
<dtml-if "_.hasattr(aq_explicit,'dirIndex')"><dtml-return dirIndex>
<dtml-else><dtml-return "0">
</dtml-if>
but didn't work. No error, but also no correct sorting. The order of
things is different from that when using no sort= attribute, but I
couldn't figure out what kind of order it is :-(
Even when I just return the id in my dtml method, where you would expect
tree-tag to sort things by id, it doesn't do the sort correctly.
So, anybody an idea what's going on here?
--
Lars Heber, mailto:Lars.Heber@t-systems.de
T-Systems, debis Systemhaus GEI GmbH, Geschaeftsstelle Sachsen