[Zope] Indirection Revisted

Martijn Pieters mj@antraciet.nl
Tue, 24 Aug 1999 09:27:47 +0200


At 17:19 23/08/99 , Joe Grace wrote:
>On a related note:
>
>Is there a way to get indirection on the field name provided to a
>
>   <dtml-in Folder sort="SomeVariableFieldIdHere">
>
>?  I've tried beaucoup variations without success.  I've looked at the python,
>and I'm not sure that the trick would be.  Is it just impossible?
>
>If it is impossible, should I be moving to ZClasses, and migrate my dtml code
>into python with DTML templates instead of just vanilla dtml?

That is indeed impossible right now, as sort only takes a name, not an 
expression. You could try and extend the in tag to support a sort_expr 
attribute. I believe DC was thinking of adding something like that.

Or you could indeed switch to ZClasses. Another solution might be Zieve, a 
sorting product. It can be found in the contributed products area on the 
Zope website:

   http://www.zope.org/Download/Contrib/

This the second beta. The documents still talk about creating a ZClass 
which subclasses the Zieve in places, but this is not necessary any longer. 
Just create an instance of it somewhere, and it will do dynamic sorting for 
you, with per user sorting preferences, stored in a cookie.

--
Martijn Pieters, Web Developer
| Antraciet http://www.antraciet.nl
| Tel: +31-35-7502100 Fax: +31-35-7502111
| mailto:mj@antraciet.nl http://www.antraciet.nl/~mj
| PGP: http://wwwkeys.nl.pgp.net:11371/pks/lookup?op=get&search=0xA8A32149
------------------------------------------