[Zope-CMF] using the subject property
Ben Riga
briga@borland.com
Mon, 2 Apr 2001 18:43:36 -0700
>>>>>
> >Hmm, this works for me on a customized search form:
> >
> > <tr valign="top">
> > <th>Subject</th>
> > <td>
> > <select name="Subject:list" multiple size="4">
> > <dtml-in expr="portal_catalog.uniqueValuesFor( 'Subject' )">
> > <option value="&dtml-sequence-item;"> &dtml-sequence-item; </option>
> > </dtml-in>
> > </select>
> > </td>
> > </tr>
>
> Cool. Thanks. The 'dtml-sequence-item' is what I was looking
> for. Looking now at the documentation, I'm embarassed that I
> missed that. The next step is to fire a topic/query that lists
> items in a 'subject'. I'll play with that over the next couple
> of days.
That should be straightforward: add a "String Criterion" for
"Subject" on the "Criteria" page of the topic.
<<<<<
So the way I'd like to solve this is to have a query that builds a list of
existing subject keywords. Then have the user click on one to fire another
query that lists all objects that have that subject in their metadata. I
have the method that lists all the subjects (SubjList) and I have a method
that can list the details of a subject (SubjDetl). My question is how do I
pass the 'subject' that the user clicked on.
SubjList:
<dtml-in expr="portal_catalog.uniqueValuesFor( 'Subject' )" >
<a href=SubjDetl>&dtml-sequence-item; </a><br>
<dtml-else>
No subjects
</dtml-in>
SubjDetl
<dtml-in "portal_catalog.searchResults( Subject= <<<need to know how I
pass info here>>>
, sort_on='Date'
, sort_order='reverse'
, review_state='published'
)" size="10">
<tr class="SubjDetlItemRow">
<td valign="top">
<a href="<dtml-var "getURL()">"> &dtml-Title; </a><br>
&dtml-Date;<br>
</td>
</tr>
<dtml-else>
<tr class="SubjDetlItemRow">
<td valign="top">
There are no details.
</td>
</tr>
</dtml-in>
Thanks,
Ben