[Zope] Struggle to call a Zclass object from another web object

pieter claassen pieter@openauth.co.uk
13 Mar 2003 10:09:26 +0000


Hello,


I guess I still don't get Zope completely.

I wrote a news manager Zclass that works well. Normally I get to the
object by calling the newster/index_html method (the default behaviour).

I want to integrate it into my website and in my root directory I have
the following objects:

index_html (dhtml object)
menu (dhtml object)
top (dhtml object)
news (Zclass object)

I want to do use my index_html to do pull all these objects together on
a single page like:

<dtml-var standard_html_header>
<dtml-var top>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td>
<dtml-var menu>
</td>
<td><dtml-var news></td>
</tr>
</table>
<dtml-var standard_html_footer>

But, clearly calling <dtml-vat news> just doesn't call the index_html
method on the news object and include the result.

I have tried things like <dtml-var expr="news.index_html()"> and that
get an error that

Traceback (innermost last):

      * Module ZPublisher.Publish, line 98, in publish
      * Module ZPublisher.mapply, line 88, in mapply
      * Module ZPublisher.Publish, line 39, in call_object
      * Module OFS.DTMLMethod, line 126, in __call__
      * Module DocumentTemplate.DT_String, line 474, in __call__
      * Module DocumentTemplate.DT_Util, line 201, in eval
        __traceback_info__: newster
      * Module <string>, line 2, in f
      * Module OFS.DTMLMethod, line 119, in __call__
      * Module DocumentTemplate.DT_String, line 474, in __call__
KeyError: standard_html_header

Somebody out there must have solved this problem? Any help is
appreciated.

Thanks,
Pieter