[Zope] ZPT reverse ordering

Tom Nixon tom.nixon@aim23.com
Thu, 2 May 2002 19:06:53 +0100


I want to list items on a page with the newest at the top. I have got
part of the way there with this code:

<tr tal:define="thelist python:p.objectValues('Kube')"
      tal:repeat="subitems python:sequence.sort(thelist,
(('bobobase_modification_time',),) )">

Two problems with this though: 

1) I want it sorted by the creation date, rather than modification date.

2) I need the results reversed so newest is at the top, not bottom.

I suspect I need to create a python script to build the list. Does
anyone have the code to do this?

Cheers

Tom