[Zope] manage_addPageTemplate path

Jay Dorsey jay at jaydorsey.com
Sun Nov 16 21:10:33 EST 2003


How would I go about using manage_addPageTemplate to add a template in a 
directory other than the one the script is called in? For example, my 
folder tree looks like this:

Root
   Folder1 (Public access)
   Folder2 (Private, secured access)
     acl_users
     addpageform (Page Template which is my form)
     addpage (Script Python)

Once someone authenticates in Folder 2 and submits the addpage form to 
the Python script, I want the script to add a PageTemplate to Folder1

I've already got the file adding part, I just need to know how to modify 
the path.

code:

item = 
context.manage_addProduct['PageTemplates'].manage_addPageTemplate(id, 
text="blah", title="my title")

Creates a new PageTemplate with the ID I specified in Folder1.  I think 
I'm a little confused as to whether this template thats created is part 
of the file system, or the ZopeDB--a regular ol' "../Folder1/" + id 
didn't seem to work for an ID.

Any help is appreciated.  I've looked through the ZopePageTemplate.py 
file, it doesn't seem as there is an option to specify a different path 
(admittedly, I'm new to this and I may not be looking in the right place).




More information about the Zope mailing list