[Zope] Setting the sort var in <dtml-in ...sort=sortVar>

Max M maxmcorp@worldonline.dk
Thu, 18 Jan 2001 00:58:24 +0100


Does anybody know if it is possible to programatically set the sort
parameter in something like: <dtml-in getAllComments sort=fwd_thread>

It's the fwd_thread in "sort=fwd_thread" i want to set via dtml to avoid:

<dtml-if "sortBy=='fwd_thread'">
    <dtml-in getAllComments sort=fwd_thread>
        Do sorted stuff
    </dtml-in>
<dtml-elif "sortBy=='author'">
    <dtml-in getAllComments sort=author>
        Do sorted stuff
    </dtml-in>
    etc.
    etc.
</dtml-if>

Or alternativley, is it possible to use the sort from dtml-in in a Python
Product as a method on the list that getAllComments() returns?

Yes I could roll my own but it would be easier to use Zope's, if I knew how
to.

regards Max M

Max M. W. Rasmussen,    Denmark.   New Media Director
private: maxmcorp@worldonline.dk work: maxm@normik.dk
-----------------------------------------------------
Specialization is for insects.  -  Robert A. Heinlein