[Zope] Searching ZCatalog on multiple properties

Chris Muldrow muldrow@mac.com
Thu, 15 Feb 2001 14:24:01 -0500


I've got some DTML Documents with properties Category and Author, and I'm
trying to build a search interface for ZCatalog. What I want to do is build
a multiple select list of the Author's names, but I want to use the Category
to only display the names of People who have written columns. As an added
wrinkle, the Author field present on the files corresponds to an "expanded
name" sitting in a mysql DB. In other words, a column I've written might
have cmuldrow in the Author property--I query the DB to return Chris Muldrow
to display to searchers.

Here's my code so far--it queries the DB correctly and returns a good list
of names, but not filtered by Category. I tried a dtml-in tag calling
NewsCatalog({'Category':'Column'}), but wherever I put it doesn't seem to
work.
Any ideas? Thanks! Chris Muldrow muldrow@mac.com

<dtml-var standard_html_header>
<h2><dtml-var title_or_id> </h2>

<form action="ColumnistFind" method="get">
<select name="User" size=10 MULTIPLE>

<dtml-in expr="uniqueValuesFor('User')">
<dtml-let authName=sequence-item>

<option value="<dtml-var sequence-item>"><dtml-in
expr="SearchAuthors(user=authName)"><dtml-var
authorName></dtml-in></options>

</dtml-let>
</dtml-in>

<input type="submit" name="Search" value="Submit query">
</select>
</form>

<dtml-var standard_html_footer>