[Zope] How to add a zPT File?

Dieter Maurer dieter@handshake.de
Tue, 30 Apr 2002 22:03:03 +0200


Roger Ineichen writes:
 > Can anybody tell me, how I can add a ZPT-File in a Class in 
 > Python. The file should be in the class after add...
 > What's the different between to add a DTML Document like below:
 > 
 > def addDocumentObject(self,id,file,title=''):
 > 	""" create a DTML Document object """
 > 	
 > self.manage_addDTMLDocument(id=id,file=DTMLFile("Products/P01_DownloadFo
 > lderManager/"+file),title=title)
 > 
 > addDocumentObject(admin.skin.users,'delUserForm','skin/dtml/delUserForm'
 > ,'delete User')
When you read the Zope book (or 

  <http://www.dieter.handshake.de/pyprojects/zope/book/chap3.html>

) you find out that the standard way to instanciate a Zope
site building class is

     object_manage.manage_addProduct[<product_name>].<constructor>(....)


But maybe, I misunderstood your question.

The analog of "DTMLFile" is "Products.PageTemplates.PageTemplateFile.PageTemplateFile". You can use is similar to "DTMLFile".


Dieter