[Zope] Zope Page Template adding
Nico de Boer
nico@nfg.nl
23 May 2002 12:47:18 +0200
Hi all,
I want to add a Zope Page Template at installation of my News
product. I've read some articles about this and found the following
code :
def _createZPT(self, parent, id, title, content):
"""Add a PageTemplate to the NewsFolder product"""
parent._setObject(id, ZopePageTemplate.ZopePageTemplate(id, text=content))
getattr(parent, id).pt_setTitle(title)
But what is parent in this context?
With other words:
What do you fill in for parent in the method call?
I get a NameError when I do the following:
self._createZPT('News','id','title','content')
( News is the meta_type of my product )
Thanks,
Nico