[Zope-CMF] Newbie question CMF Document

Jon Edwards jon@pcgs.freeserve.co.uk
Wed, 8 Aug 2001 10:24:24 +0100


> I am trying to display the body of a document but
> don't know which property/method to use. I am
> retrieving the list of documents wit
> portal_catalog.searchResults method.

CookedBody is what you want I think. As in

<dtml-var CookedBody>

If you have a look in the portal_skins/content folder, you'll see "view"
methods for the various types of content, which should help.

Incidentally, it seems that discussionitem, document, and newsitem all have
a CookedBody. Would it make sense to give all other content-types a
CookedBody method? Seems to me it would make it much easier when you're
writing methods that display objects, as you wouldn't have to worry about
what type/meta_type it is, you could just use CookedBody to display the
"guts" of the object?

So just as all types have a "view" method for when they are called directly,
they also would have a "CookedBody" method for when they are called within
another method/object?

Hope that makes sense

Cheers, Jon