[Zope] problems sorting with in-tag
Martijn Pieters
mj@antraciet.nl
Mon, 31 May 1999 16:45:07 +0200
At 14:54 31/05/99 , Sebastian Luehnsdorf wrote:
>hi!
>
>i got a problem trying to sort the results from an in tag. i have three
>different conditions, and want to unite these into one solution. something
>like
>
> <!--#in "..." sort=sortby-->
>
>where 'sortby' designates the variable to be sorted by. now i would like
>to access the document with the in tag like this:
>
> abc.dtml?sortby=thisval
>
>this doesn't work. what am i doing wrong?
>
>ciao, basti
The sort attribute cannot be dynamically assigned..
What happens is this: DTML is pre-parsed, and all the DTML tags are
replaced by object instances representing those tags. The attributes are
stored as instance variables. This means that 'sortby' is evaluated only
once, when you save the DTML code.
Right now there is no real solution to your problem, other then creating
different #in tags and selecting one with an if - elseif - else structure.
--
Martijn Pieters, Web Developer
| Antraciet http://www.antraciet.nl
| Tel: +31-35-6254545 Fax: +31-35-6254555
| mailto:mj@antraciet.nl http://www.antraciet.nl/~mj
| PGP: http://wwwkeys.nl.pgp.net:11371/pks/lookup?op=get&search=0xA8A32149
------------------------------------------