[Zope] Minimal product refresh ?

Max M maxm at mxm.dk
Thu Jan 22 03:37:33 EST 2004


fowlertrainer at anonym.hu wrote:

 > 1.)
 >  How to I use this product in my site ?
 >  I try with this:
 >    a.) I've been create an object of the product minimal in the zope's
 >        root.

That is ok.


 >    b.) I've been create an index_html:
 >        <p tal:replace="structure python: here.minimal.index_html()"/>
 >  But I think, it is not the normal way of the usage... :-(


You are right in that.

If you want to use page templates, you should overwrite the index_html() 
method with a pagetemplate.

You do this by importing PageTemplateFile in the product::

    from Products.PageTemplates.PageTemplateFile import PageTemplateFile

Then you create a callable class called index_html like this:

    index_html = PageTemplateFile('index_html', globals())

Inside the index_html.zpt you can then create a page template::

    <html><body>Hello World<br>The array is: <span
    tal:replace="python:str(here/params)"></body></html>



regards Max M



More information about the Zope mailing list