[Zope-CMF] behavior of CookedBody
marc lindahl
marc@bowery.com
Mon, 04 Jun 2001 00:19:40 -0400
I'm still trying to figure out CookedBody.... the latest is, I wanted to put
the latest news item in a table in a page. So cutting and pasting from
news_box and newsitem_view, I came up with the code below. It gives a
KeyError on CookedBody, name not found or not allowed. If I take that out,
it works fine. Confusing for me, since shouldn't the other variables be in
the same context, and therefore all found or not found?
code:
<dtml-comment>put latest news item here</dtml-comment>
<dtml-in "portal_catalog.searchResults( meta_type='News Item'
, sort_on='Date'
, sort_order='reverse'
, review_state='published'
)" size="1">
<div class="Desktop">
<div class="NewsItem">
<blockquote class="Description">
<dtml-var Description fmt="structured-text">
</blockquote>
<dtml-var content_byline>
<dtml-var CookedBody>
<div class="Discussion">
<dtml-var viewThreadsAtBottom>
</div>
</div>
</div>
</dtml-in>