Question about <dtml-in> sorting
Does sort only sort in one direction? I am looking to sort news items so that the newest items are on top, and when sorting on a date field, I get the opposite behaviour. Any easy way to reverse the sort order? Thanks pk
"Patrick J.M. Keane" wrote:
Does sort only sort in one direction? I am looking to sort news items so that the newest items are on top, and when sorting on a date field, I get the opposite behaviour. Any easy way to reverse the sort order?
Yes, by adding reverse to the sort tag ;-) <dtml-in <sortablelist> sort=<sorting_variable> reverse> Rik
<dtml-in something sort=sort_thing reverse> </dtml-in> ----- Original Message ----- From: "Patrick J.M. Keane" <keane@danet.com> To: <zope@zope.org> Sent: 30 May 2000 07:25 Subject: [Zope] Question about <dtml-in> sorting
Does sort only sort in one direction? I am looking to sort news items so that the newest items are on top, and when sorting on a date field, I get the opposite behaviour. Any easy way to reverse the sort order?
Thanks pk
_______________________________________________ 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 )
Patrick J.M. Keane writes:
Does sort only sort in one direction? I am looking to sort news items so that the newest items are on top, and when sorting on a date field, I get the opposite behaviour. Any easy way to reverse the sort order?
Thanks pk
<dtml-in MyItems sort=whatever reverse> Jason Spisak CIO HireTechs.com 6151 West Century Boulevard Suite 900 Los Angeles, CA 90045 P. 310.665.3444 F. 310.665.3544 Under US Code Title 47, Sec.227(b)(1)(C), Sec.227(a)(2)(B) This email address may not be added to any commercial mail list with out my permission. Violation of my privacy with advertising or SPAM will result in a suit for a MINIMUM of $500 damages/incident, $1500 for repeats.
Patrick J.M. Keane wrote:
I get the opposite behaviour. Any easy way to reverse the sort order?
Well, I found there _is_ a reverse attribute to the <dtml-in> tag, but it's not documented in my version (2.1.0, 1999/12/17) of the DTML Reference. It works. Cheers, Nils
participants (5)
-
Jason Spisak -
Nils Kassube -
Patrick J.M. Keane -
Phil Harris -
Rik Hoekstra