[Zope] ZCatalog and Search Results
Aaron Payne
aaron@aaronpayne.com
Sat, 10 Jun 2000 09:51:09 -0400
At 07:37 pm 6/9/00 +0000, Jason Spisak wrote:
Then it has to be the search forms. Can you sned me the search and report
methods. Also, you should try looking up and instance programatically
right after you create it, like so:
<dtml-in "Catalog(myProperty='knownValue')">
<dtml-var id>
</dtml-in>
Jason,
I used the dtml-in for the catalog(myproperyty='xyz') and I found the newly
added zclass. It may be the z search forms.
Thanks for your help,
Aaron
Here is the search method:
<dtml-var standard_html_header>
<strong>Coupon Search Results....</strong>
<P>
<dtml-if vendor><strong>Vendor:</strong> <dtml-var vendor><BR></dtml-if>
<dtml-if categorylist><strong>Subcategory:</strong> <dtml-var
categorylist><BR></dtml-if>
<dtml-if coupon_text><strong>Coupon Text:</strong> <dtml-var
coupon_text><BR></dtml-if>
<dtml-if zip><strong>Zip:</strong> <dtml-var zip><BR></dtml-if>
<P>
<dtml-in Catalog size=50 start=query_start>
<dtml-if sequence-start>
<dtml-if previous-sequence>
<a href="<dtml-var URL><dtml-var sequence-query
>query_start=<dtml-var
previous-sequence-start-number>">
(Previous <dtml-var previous-sequence-size> results)
</a>
</dtml-if previous-sequence>
<table border>
<tr>
<th>Vendor</th>
<th>Coupon text</th>
<th>Homepage</th>
</tr>
</dtml-if sequence-start>
<tr>
<td><a href="<!--#var
"Catalog.getpath(data_record_id_)"-->"><dtml-var vendor></a></td>
<td><dtml-var coupon_text></td>
<td><a href="http://<dtml-var homepage>"><dtml-var
homepage></a></td>
</tr>
<dtml-if sequence-end>
</table>
<dtml-if next-sequence>
<a href="<dtml-var URL><dtml-var sequence-query
>query_start=<dtml-var
next-sequence-start-number>">
(Next <dtml-var next-sequence-size> results)
</a>
</dtml-if next-sequence>
</dtml-if sequence-end>
<dtml-else>
There was no data matching this <dtml-var title_or_id> query.
</dtml-in>
<dtml-var menu>
<dtml-var standard_html_footer>
Here is the report method:
<dtml-var standard_html_header>
<form action="CatReport" method="get">
<h2><dtml-var document_title></h2>
Enter query parameters:<br><table>
<tr><th>Coupon text</th>
<td><input name="coupon_text"
width=30 value=""></td></tr>
<tr><th>Categorylist</th>
<td><input name="categorylist"
width=30 value=""></td></tr>
<tr><th>Vendor</th>
<td><input name="vendor"
width=30 value=""></td></tr>
<tr><th>Zip</th>
<td><input name="zip"
width=30 value=""></td></tr>
<tr><td colspan=2 align=center>
<input type="SUBMIT" name="SUBMIT" value="Submit Query">
</td></tr>
</table>
</form>
<dtml-var menu>
<dtml-var standard_html_footer>