I have a feeling that the problem is the way the manage_addProduct machinery works. Perhaps you can try this: <dtml-with "manage_addProduct['YourProduct']"> <dtml-call "MaterialFolder_add(_.None, _, NoRedir=1)"> </dtml-with> In place of just the call to MaterialFolder_add. This is untested, and it's just a hunch. Kevin ----- Original Message ----- From: "Ingo Assenmacher" <ingo.assenmacher@post.rwth-aachen.de> To: <zope@zope.org> Sent: Saturday, February 12, 2000 10:34 AM Subject: [Zope] create folder within folder-object via DTML
I want to automatically create some instances of default objects whenever creating a specific folder-object within the zope-management interface. This is what I do within the constructor of a folderish object:
<dtml-with "termin.createInObjectManager(REQUEST['id'], REQUEST)">
<dtml-call "manage_addFile('invitation', '', 'Einladung')"> // (works) <dtml-call "manage_addFile('protokoll', '','Protokoll')"> // (works)
<dtml-call "REQUEST.set('id', 'material')"> <dtml-call "REQUEST.set('public_view', '1')"> <dtml-call "REQUEST.set('public_upload', '0')"> <dtml-call "REQUEST.set('owner_delete', '1')"> <dtml-call "REQUEST.set('store_in_db', '1')"> <dtml-call "MaterialFolder_add(_.None, _, NoRedir=1)">
The last one works, too, BUT the folder is NOT created within the folderish "termin" (unlike the "add_files").
This is what I want:
termin (folder) | invitation (file) | protokoll (file) | material (folder)
And this is waht I get:
termin (folder) | invitation (file) | protokoll (file) material (folder)