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-in balh sort="bobobase_modification_time">

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>)

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 -*- [EMAIL PROTECTED]
Support Center of Washington (www.scw.org)

Zope maillist  -  [EMAIL PROTECTED]
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-dev )

Reply via email to