[Zope-CMF] Custom type with 'cooked' attribute
Tres Seaver
tseaver@zope.com
04 Dec 2002 08:16:20 -0500
On Wed, 2002-12-04 at 01:27, Anton Hughes wrote:
> I have written a custom type (filesystem product) based on document with a
> custom attribute 'boxtext'. I want people to be able to fill it with HTML
> and have it correctly rendered within a Page Template, as per Document.text
> . But of course it keeps getting HTML encoded. So my question is, how do I
> do this.
>
> I'm sure that this must be fairly easy to do, but I just can't understand
> how to do it.
TAL does HTML quoting by default; you can turn it off using the
'structure' modifier:
<div tal:contents="here/getBoxtext">QUOTED</div>
<div tal:contents="structure here/getBoxtext">NOT QUOTED</div>
Tres.
--
===============================================================
Tres Seaver tseaver@zope.com
Zope Corporation "Zope Dealers" http://www.zope.com