[Zope] referencing objects returned by z-catalog
wchr
wchr@gmx.at
Mon, 01 Jul 2002 19:07:49 +0200
instead of:
<dtml-var expr="_['sequence-item'].notes">
try the following:
<dtml-with getObject>
<dtml-var notes>
</dtml-with>
/wolfie
--
http://www.t0.or.at
Ben Avery wrote:
> Hi,
>
> I'm having difficulty with the syntax needed to access the objects in the
> results object returned by a z-catalog.
>
> I'm using the dtml-calendar tag to give a calendar display of objects, which
> have a date field.
> I have 3 objects of a product called calendar_event, which has a text
> property notes, and string field event_date.
> I have a z-catalog called ce_catalog, which indexes these, but without the
> notes field in the metadata - it's a large text field, so I don't want to
> bring it back in every object referred to in a search result.
>
> I try to call it with the following dtml:
>
> <dtml-calendar>
> <dtml-let year="date.year()"
> month="date.month()"
> day="date.day()"
> key="'%.4d-%.2d-%.2d' % (year,month,day)">
> <dtml-in "ce_catalog({'event_date':key})">
>
> <dtml-var expr="_['sequence-item'].notes">
>
> </dtml-in>
> </dtml-let>
> </dtml-calendar>