23 May
2002
23 May
'02
10:47 a.m.
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
8719
Age (days ago)
8719
Last active (days ago)
0 comments
1 participants
participants (1)
-
Nico de Boer