sort catalog results w/ table headers ?
hello, here is my situation... I would like the headers of the table containing the results of a catalog query, to be reversable sorting. I'm not sure i'm clear, but just like in the FileLibrary example given w/ zope 2.5. I studied this example and tried to modify it to suit my need but... As it always starts a new query i get a new results sorted. Say I have a result from the Catalog from a complex query... when I sort w/ the headers I loose my filter, all records comme back. I don't know how to keep the parameters of the query (session ?) As well, I need a default query to apply (the last 20 modified) Everything works fine, but this. I am not very familiar of the new TAL language... at the moment I still develop mostly in DTML & python scripts. I think, I have a very standard situation, but found no info about that in my books, or the zope book, or the last 10,000 messages of this board.... any help appreciated
Nicolas LAURANCE writes:
I would like the headers of the table containing the results of a catalog query, to be reversable sorting. I'm not sure i'm clear, but just like in the FileLibrary example given w/ zope 2.5. I studied this example and tried to modify it to suit my need but... As it always starts a new query i get a new results sorted. You need to pass your old parameters.
You have (at least) two options: * you use "GET" requests (which is appropriate for searches). Then the parameters to your request are in "QUERY_STRING". You may need to strip out your sorting parameters (using 'replace') (or use my ":last" path on <http://www.dieter.handshake.de/pyprojects/zope>) in order not to get your parameters piled up. * you use the "make_query" (or something similar) in "ZTUtils" to build your parameters. For both cases, you can get intuition from a batching example (I expect, you find some in the Zope Book). Dieter
participants (2)
-
Dieter Maurer -
Nicolas LAURANCE