[Zope] Using a template for all pages, or calling dtml as a function, or perhaps switch to Zpt ??

Dieter Maurer dieter@handshake.de
Wed, 12 Jun 2002 20:16:45 +0200


Max M writes:
 > I have a site where i want to use the same template for all the pages. 
 > Lets say that I have the following structure:
 > 
 > index_html:
 >     <b>
 >     <dtml-var primary_content>
 >     </b>
 >     <i>
 >     <dtml-var secondary_content>
 >     </i>
 >     
 > I then want to use this template for all my pages. Most of my products 
 > will them implement "primary_content()" and "secondary_content()" 
 > methods. If a product hasn't implemented one of the methods, it just 
 > finds it from somewhere up the aquisition (aq) path
 > 
 > So far so good.
 > 
 > My problem is that it seems that I have to define "index_html" in every 
 > product for this to work.
 > 
 > If I just put an "index_html" in the root of my aq path zope will 
 > traverse it's way up to it allright, but naturally won't find the 
 > objects "primary_content()" and "secondary_content()" methods. So the 
 > view is wrong.
Are you sure, "index_html" is a DTML Method and not a DTML Document?


Dieter