[Zope] create folder within folder-object via DTML
Ingo Assenmacher
ingo.assenmacher@post.rwth-aachen.de
Sat, 12 Feb 2000 16:34:15 +0100 (MET)
Hi all!
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)
How is this?
Thanks for any help!
Regards, Ingo
------------------------------------------