[Zope] Calling a ZPT on an object

Felix Ulrich-Oltean felix@chaptereight.com
Tue, 27 Aug 2002 14:26:37 +0100


Perfect - thanks.

> > I have made a python Product and I'm trying to set up its public
> > view.  The user can pick (per instance) which template to use from a
> > folder-full of templates.  I want the index_html method of my object
> > to call the chosen template with the correct bindings, i.e. here
> > should refer to my object instance.
> > 
> Try:
> 
> pt = self.zest_template.news[self.template].__of__(self)
> return pt()