[Zope-CMF] behavior of CookedBody

marc lindahl marc@bowery.com
Mon, 04 Jun 2001 14:54:48 -0400


> From: Jeffrey Shell <jeffrey@Digicool.com>
> 
> 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.

OK, fine... so that means, when one wants the proper presentation you always
use CookedBody, regarless of whether it's a structured text, html, plain, or
whatever?  

And EditableBody is sort of like 'show source'?

Perhaps it's just the nomenclature.... I suggest that Body() could be used
with any type of Document, Image, etc., yielding a presentable bit of stuff
suitable for insertion into another document or webpage, where some more
obscure name, EditableBody or BodySource could show the raw stuff... leaving
the full webpage output to __call__ or index_html.