This is probably really easy but I can't find it anywhere in the docs. I can iterate over a catalog just fine, sorted, for example: <dtml-in Catalog sort_by=bobobase_modification_time> ... </dtml-in> But how do I sort in reverse order? thanks much -Kevin __________________________________________________ Terrorist Attacks on U.S. - How can you help? Donate cash, emergency relief information http://dailynews.yahoo.com/fc/US/Emergency_Information/
At 11:13 20.09.2001 -0700, Kevin Lewandowski wrote:
This is probably really easy but I can't find it anywhere in the docs. I can iterate over a catalog just fine, sorted, for example:
<dtml-in Catalog sort_by=bobobase_modification_time> ... </dtml-in>
But how do I sort in reverse order?
thanks much
-Kevin
That would be <dtml-in Catalog sort_by=bobobase_modification_time sort_order=reverse> ... </dtml-in> Jan@Mountainbikehq.de http://www.MountainbikeHQ.de - Your home for DH, DS and CC Mountainbiking
Note that this is a *killer* speed-wise, very slow. Better to index on something that is not a datetime object, maybe something like bbb_mod_timetime, e.g.: def bbb_mod_timetime(self): return self.bobobase_modification_time.timeTime()
That would be
<dtml-in Catalog sort_by=bobobase_modification_time sort_order=reverse> ... </dtml-in>
Jan@Mountainbikehq.de http://www.MountainbikeHQ.de - Your home for DH, DS and CC Mountainbiking
_______________________________________________ Zope maillist - Zope@zope.org http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
participants (3)
-
Chris McDonough -
Jan Lentfer -
Kevin Lewandowski