I'm trying to implement some database interaction in Zope. I'm using ZSQL and <dtml-in> tags to display the data on the web page. The data has a date in it, and I would like to sort so that most recent is first. However, I see no mention of a "reverse" option with the sorting capability of the <dtml-in> tag. Is there a way to script the reverse sorting in DTML, or do I have to do all my sorting inside the database query (ZSQL method)? Thanks, Chuck Burdick Web Administrator / Developer Trading Technologies, Inc. chuck.burdick@tradingtechnologies.com (847) 424-8844
Like many Zope features, finding documentation and examples may be rather hit-or-miss. The fragment below displays the single most recently updated instance of my "quotation" Zclass in the "quotes" folder: <dtml-with quotes> <dtml-in "objectValues(['quotation'])" reverse sort=bobobase_modification_time size=1 orphan=1> <p><b><dtml-var "_['sequence-item']"></b></p><center>-<dtml-with "_['sequence-item']"><dtml-var author></dtml-with></center> </dtml-in> </dtml-with> Hope this helps. Craig
Is there a way to script the reverse sorting in DTML, or do I have to do all my sorting inside the database query (ZSQL method)?
-- Craig Allen - Managing Editor - Content Management Review - http://cmreview.com
participants (2)
-
Chuck Burdick (TT) -
Craig Allen