[Zope] Dymanic sort="&dtml-a_dtml_var;" in DTML?
Joel Burton
jburton@scw.org
Tue, 17 Oct 2000 14:21:59 -0400
I'd like to create a DTML method that lists objects, sorting either by
name or modified-date. I know I can do this by:
<dtml-if ..byname...>
<dtml-in blah sort="title_or_id">
...
</dtml-else>
<dtml-in balh sort="bobobase_modification_time">
...
</dtml-if>
However, this requires lots of code. I'm trying to do it like this:
Sorted by &dtml-sortby; <!-- for debugging -->
<dtml-in objectValues sort="&dtml-sortby;">
<dtml-var title_or_id> (<dtml-var bobobase_modification_time>)
</dtml-in>
I have a property, sortby, of the enclosing folder set to
"bobobase_modification_time"; when this method is called, it
dutifully reports that sortby=b_m_t; however, it doesn't sort things
this way (I can't tell exactly how it is sorting them, and when I
refresh, the order occasionally changes.)
Any ideas?
--
Joel Burton, Director of Information Systems -*- jburton@scw.org
Support Center of Washington (www.scw.org)