[Zope-CMF] behavior of CookedBody

Jeffrey Shell jeffrey@Digicool.com
Mon, 4 Jun 2001 14:21:06 -0400


On Monday, June 4, 2001, at 12:59  PM, marc lindahl wrote:
> Makes total sense... already it's a little silly to have to check 
> a Document
> to decide whether to use EditableBody or CookedBody -- the user 
> should be
> shielded from such minutae, and just get the properly presented 'stuff'
> (Body()?)

Before these methods were put in place, we had (and still have) the 
attributes "text" and "cooked_text".  text -> EditableBody() (ie, 
unprocessed structured text); cooked_text -> CookedBody() (ie, 
processed structured text).

Doing a "<dtml-var text>" then could yield surprisingly frightening 
results, although one would probably tend to use 'var text" over 
'var cooked_text'.  The newer names try to be slightly more obvious.

EditableBody should only be used in editing forms, or anywhere 
where you want to show the source of the body.

Jeffrey P Shell, jeffrey@Digicool.com
http://www.digicool.com/ | http://www.zope.org/