Re: [Zope] Dynamic sorting key?
Zoper writes:
..., however I would like to sort on different key by different paramenter...
something like "... sort=REQUEST['sort_by'] ..." (doesn't work) where sort_by from URL parameter maybe "id", "title", "getSize" or "bobobase_modification_time", etc... This is a known weakness.
AFAIK, there is currently no way to treat values for "sort" as expressions. You may try, ... sort="REQUEST['sort_by']" ... (note the "..."!), but it will probably not work. It, obviously, is useful, but I believe nobody has implemented it yet. Dieter
This is (mostly) the point if Zieve: http://www.zope.org/Members/sspickle/Zieve the good news is it's much more powerful than 'sort='. The bad news is it's much more complex than 'sort='. It also (currently) uses a cookie for each Zieve instance. I'd love any feedback on making this product more useful/friendly. -steve
"Dieter" == Dieter Maurer <dieter@handshake.de> writes:
Dieter> Zoper writes: >> ..., however I would like to sort on different key by different >> paramenter... >> >> something like "... sort=REQUEST['sort_by'] ..." (doesn't work) >> where sort_by from URL parameter maybe "id", "title", "getSize" >> or "bobobase_modification_time", etc... Dieter> This is a known weakness. Dieter> AFAIK, there is currently no way to treat values for Dieter> "sort" as expressions. You may try, Dieter> ... sort="REQUEST['sort_by']" ... Dieter> (note the "..."!), but it will probably not work. Dieter> It, obviously, is useful, but I believe nobody has Dieter> implemented it yet. Dieter> Dieter Dieter> _______________________________________________ Zope Dieter> maillist - Zope@zope.org Dieter> http://lists.zope.org/mailman/listinfo/zope ** No cross Dieter> posts or HTML encoding! ** (Related lists - Dieter> http://lists.zope.org/mailman/listinfo/zope-announce Dieter> http://lists.zope.org/mailman/listinfo/zope-dev )
participants (2)
-
Dieter Maurer -
Steve Spicklemire