[Zope] Passing lists in a get request (ZCatalog Search)

Darin Lee LEEDM@state.mi.us
Fri, 01 Dec 2000 15:21:25 -0500


Zopistas,

I have a catalog aware ZClass publication object that I want to have searchable. There are 3 criteria I want users to be able to select in addition to a search string textbox.

I created field indexes for the criteria in the zCatalog, and made a form where users can select the indexes with checkboxes to limit their search. The selected items are then passed to my search method - which in turn executes a <dtml-in> to produce the result set.

The whole thing works great, until I decided to try to add column sorting functionality (Like the zope downloads page).  Here is the problem, I run the query and the page comes up correctly on the first iteration, but when I try to sort the column (with a ?sort_on=index "get" request), the selected criteria are forgotten and the entire result set is returned sorted. 

for example, one of my search criteria is "theme" - there are four possible  (Air, Land, Water, and Waste). 

the request would look like:
search?meta_type=Publication&theme=Air&theme=Land&theme=Water

I can't figure out how to pass a list in the get request. How do I pass more than one theme to the method as a list? I have discovered through trial and error that I can pass it the values if I repeat theme for each list item. However, I also have a criteria - "category" with over 32 items, and a criteria - "division" with 14 items. This becomes extremely clumsy with "category=reports&category=guidebooks&division=lwm&division=aqd" etc. repeated 32 times. Not to mention that there is a limit of how much info I can pass in the get request itself.
 
Is there a better way to pass the lists to my method?

Thanks in advance!
-Darin Lee