[Zope] Displaying the text content of a ZClass

Alexandre Ratti alex@gabuzomeu.net
Tue, 07 Dec 1999 11:44:34 +0100


At 16:59 06/12/1999 -0500, Michel Pelletier wrote:
> > => 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 ?
>
>I would think you could just call the ZClass instance like any other
>DTML Method:
>
><dtml-var myZClassInstance>


That's not what I meant: within your ZClass (in the Products folder), you 
need to create an index_html method to define the default view for your 
ZClass. Eg.:

-YourProduct
   -YourZClass
      - index_html
      - formEditProperties
      ... other methods

index_html will be mapped to the ZClass View tab in Views.

What I mean is: how can you access the text content of the ZClass from 
within index_html? How to you show the text content? If I use <dtml-var 
raw>, embedded DTML is not interpreted.


>This doesn't work?  If not, what is the error/traceback?
>
>BTW, are you getting an error/traceback at some point?

No error. I can use <dtml-var raw> in index_html to display the ZClass text 
content. It works, except that embedded DTML is sent as is to the browser.


Thanks.

Alexandre

>-Michel