Andreas, Hmm, well it seems to work for me! After looking at the code, I tried to pass the dynamic sort keys to sort_expr as a string, e.g. 'sortKey1,sortKey2,sortKey3', and that seems to do the trick. Too scared to make the jump to 2.4 yet. How stable is it? Cheers, Jean
-----Original Message----- From: Andreas Jung [mailto:andreas@andreas-jung.com] Sent: Friday, July 13, 2001 15:38 To: Jean Lagarde; benoit.dominiak@makinacorpus.com Cc: zope@zope.org Subject: Re: [Zope] Choice of the sorting key of a dtml-in tag
The sort attribute only allows one key. To sort by multiple keys you must use _.sequence.sort() (Zope2.4).
========================================================================== Andreas Jung andreas@digicool.com Digital Creations "Zope Dealers" http://www.zope.org
----- Original Message ----- From: "Jean Lagarde" <jean.lagarde@eer-rc.com> To: <benoit.dominiak@makinacorpus.com> Cc: <zope@zope.org> Sent: Freitag, 13. Juli 2001 16:30 Subject: RE: [Zope] Choice of the sorting key of a dtml-in tag
Benoit,
I was looking at the source code (I'm trying to figure out how to put multiple keys in sort_expr -- it does not accept a list as I first assumed), and found that there is also a reverse_expr attribute which will do exactly what you need.
So you need to use both sort_expr="skey" and reverse_expr="rev" (I think that rev=='' will not reverse, but if that doesn't work, try setting rev to None).
Cheers,
Jean
[snip]