Hi all, Hope this isn't too lame a question: I'm using this construct, right out of the Elvis example: <dtml-in expr="newsFolder.objectValues()"> <dtml-var sequence-item> </dtml-in> The folder contains small text files. How do I get this to sort by "most recently added", so the newest additions to the folder end up at the top? It seems to work in the reverse, by default. regards, --Lars Johannesson
On Wed, Sep 04, 2002 at 10:03:25AM -0700, Lars Johannesson wrote:
The folder contains small text files. How do I get this to sort by "most recently added", so the newest additions to the folder end up at the top? It seems to work in the reverse, by default.
Look up the "in" tag in the Zope Book dtml reference (appendix A). The secret modification time attribute of all Zope objects is bobobase_modification_time. (It dates back to before Zope was Zope.) -- Paul Winkler "Welcome to Muppet Labs, where the future is made - today!"
Paul Winkler wrote:
The secret modification time attribute of all Zope objects is bobobase_modification_time. (It dates back to before Zope was Zope.)
In this case you can also just use the fact that Zope returns the objects in the order they are added, and then use the reverse option. regards Max M ><evolve> > >
Lars Johannesson wrote:
<dtml-in expr="newsFolder.objectValues()"> <dtml-var sequence-item> </dtml-in>
<dtml-in expr="newsFolder.objectValues()" reverse>
The folder contains small text files. How do I get this to sort by "most recently added", so the newest additions to the folder end up at the top? It seems to work in the reverse, by default.
;-) regards Max M "Skeptic Effect" or the "Randi Effect" When a skeptic is near, supernatural effects seem to disappear.
participants (3)
-
Lars Johannesson -
Max M -
Paul Winkler