[Zope] index_html of zclass

Einar Næss Jensen einar at hf.ntnu.no
Tue May 11 16:09:00 EDT 2004


Jim Washington wrote:

> Einar Næss Jensen wrote:
>
>> I have a zclass (with ZObject, ZObjectManager baseclasses) "Content"
>> with a method index_html.
>> If it is possible, how may i add an index_html to the instances of
>> "content"?:
>>
>> /zclass Content
>>            |
>>            index_html
>>
>>
>> Content instance
>>             |
>>             index_html
>>
> Probably easiest is to make a conditional
>
> /zclass Content
>           |
>           index_html
>
> would contain something like
>
> <dtml-if custom_index_html>
> <dtml-var custom_index_html>
> <dtml-else>
> [standard content]
> </dtml-if>
>
> and
>
> Content instance
>            |
>            custom_index_html
>
> contains the instance-specific content
>
Yes. But that's not what I want I ended up with this, more or less 
stupid, workaround, which suits my needs
In my zclass i have
DEFAULT_index_html

In my instance I have
index.html

AND:
somewhere at the root I have an index_html which load index.html (and 
different variants) OR DEFAULT_index_html


This may seem stupid, but works for me.







More information about the Zope mailing list