[Zope] Product Creation: Adding Folder

Laurie Nason lnason@bcm.tmc.edu
Tue, 16 Jul 2002 09:05:51 -0500


Hi Alex,
Firstly - a slap on the wrist - don't send html mail to this list!

Secondly the answer to your problem.
In the ZClass_add method you need to do the following:

<dtml-with "Your_ZClass_Name.createInObjectManager(REQUEST['id'], REQUEST)">
    <dtml-call "propertysheets.Basic.manage_editProperties(REQUEST)

>>>>>Now Add the folder
    <dtml-call expr="manage_addFolder(id='Folder_id',title='Folder Title')">
</dtml-with>

Note that the manage_addFolder is inside the dtml-with statement - this
keeps the context in the right place to create the folder

hth
Laurie

Laurie Nason
Scientific Programmer
National Center for Macromolecular Imaging
Houston TX USA

-----Original Message-----
From: zope-admin@zope.org [mailto:zope-admin@zope.org]On Behalf Of Alexander
M Hottenstein
Sent: Monday, July 15, 2002 8:23 PM
To: zope@zope.org
Subject: [Zope] Product Creation: Adding Folder


I am attempting to create a ZClass for a new product, which, when created on
the site will automatically add a visible folder. I have attempted to use a
folder directly within the ZClass, but for some reason it causes security
problems. I know there is a way to do this, but I am not sure how to.

If you have any ideas, please let me know.

- Alex