[Zope] Programatically creating folders.

Dennis Allison allison@sumeru.stanford.EDU
Wed, 21 May 2003 09:33:43 -0700 (PDT)


On Wed, 21 May 2003, John Kipling Lewis wrote:
> 
> How do I create a folder object programatically?  I don't want to user the
> Zope pull down in manager, I want to have it as a function.
> 
The API in the Zope Book is your friend.

manage_addProduct['OFSP'].manage_addFolder(id, title)

The manage_addProduct is an ObjectManager; manage_addFolder is a
constructor.

The detailed form depends upon whether you are creating the object 
is DTML, python, or ZPT.  For example, use

	<dtml-call expr="manage_addProduct....">

from DTML, 

	container.manage_addProduct....

from Python.