[Zope] Dynamic sorting with dtml-in

Ingo Assenmacher ingo.assenmacher@post.rwth-aachen.de
Tue, 01 Feb 2000 17:27:29 +0100 (MET)


Hi Duncan!

Am 01-Feb-00 schrieb Duncan Booth:
> 
>> Any Ideas? Or do I have to rewrite the complete show_table to
>> "show_table_sort_title"-stuff and call each seperately? There nust be a
>> more Zopish thing to get that working.
>> 
> One way is to produce a separate method for each sort key and 
> factor out the body of the loop into a separate method:

Hmm... I almost was afraid of this... but, on the other hand, why not?

> 
> One nice feature with this is that you can have a show_table_body 
> method for the default display, but override it as necessary.
> 

Ok.

> If your data was in a database, the best way is to sort the database 
> query. 

That would be nice, I know. But unfortunately this is not the case. Instead the
objects to be displayed are regular ZODB-Objects created via User-Upload.

Thank you very much for your help.


Regards, Ingo

------------------------------------------