Setting variables in the REQUEST is bad but always works reliably. These can be set in the form that posts to the search (see Zope.org) or as a last resort do: <dtml-call "REQUEST.set('Column', 'Category')"> <dtml-in NewsCatalog> -- Andy McKay. ----- Original Message ----- From: "Chris Muldrow" <muldrow@mac.com> To: <zope@zope.org> Sent: Thursday, February 15, 2001 11:24 AM Subject: [Zope] Searching ZCatalog on multiple properties
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>
_______________________________________________ Zope maillist - Zope@zope.org http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )