[Zope-CMF] NewsItem Bodies
Florent Guillaume
fg@nuxeo.com
29 Nov 2001 13:27:09 GMT
This is not a CMF specific question.
searchResults returns a lazy, pseudo-list of brains. Brains have as
attributes all the attributes you specified as Metadata in the catalog.
So unless you used CookedBody as Metadata (which would use a lot of
memory), you have to use the getObject method of a brain:
<dtml-var "getObject().CookedBody()">
Florent
HoYin Au <hya-zopecmf@bluesite.com> wrote:
> Hi,
>
> I'm trying to get something like this (in theory) to work... but it's giving
> me a KeyError. What am I doing wrong?
>
> <dtml-let newsitems="portal_catalog.searchResults(meta_type='News Item',
> sort_on='Date', sort_order='reverse', review_state='published')">
> <dtml-in newsitems size="10" start="batch_start">
> <p><dtml-var CookedBody></p>
> </dtml-in>
> </dtml-let>
>
> -Hoyin
--
Florent Guillaume, Nuxeo SARL (Paris, France)
+33 1 40 33 79 10 http://nuxeo.com mailto:fg@nuxeo.com