[Zope] Displaying the text content of a ZClass

Alexandre Ratti alex@gabuzomeu.net
Mon, 06 Dec 1999 15:54:52 +0100


Hello,


I've created a ZClass that subclasses CatalogAware, DTMLDocument and 
DTMLMethod.

This Zclass has several properties. It also has a text content. This 
content is entered in a textarea field in a form and saved with <dtml-call 
"manage_edit(REQUEST.data, REQUEST.title)"> just as in a DTML method. This 
works fine.

The ZClass content is displayed with a method called index_html (nothing 
fancy). This method displays property values and the text content. Eg.

<dtml-var standard_html_header>
  ... standard HTML stuff for ZClass instances ...
  <dtml-var myProp1> - <dtml-var myProp2>
<HR>
  <dtml-var raw>
</dtml-var standard_html_footer>

Problem: this works OK as long as the ZClass text doesn't content nested 
DTML. <dtml-var raw> tag just inserts the text content as is. It is 
unrendered (I suppose that's why it's called "raw"). <dtml-var title> is 
sent as is to the browser.

=> How can I display the rendered text content for a ZClass? It sounds 
simple but I'm stuck.

=> I'll rephrase the question: imagine you want to wrap DTML Methods in a 
ZClass to make them CatalogAware and add custom properties. How do you 
display the content of the ZClass instances ?


Thanks.

Alexandre