[Zope] Programatically creating folders.
Seb Potter
seb@getfrank.com
Wed, 21 May 2003 17:50:04 +0100
> Actually, I was mistaken.
>
> We've written a Zope product that extends folder. We want to add one of
> our objects to this extended folder. We assume that 'OFSP' in
> manage_addProduct would be changed to point to our new product, but are
> unsure what to call it.
That depends on what your module is called.
Say you've written a new product and placed it into your Products folder
as:
Products/MyProduct/BetterFolder.py
and we'll assume that you've kept the constructor as:
def manage_addFolder( id, title )
then all you should need to do is call:
container.manage_addProduct['MyProduct'].manage_addFolder(id, title)
This uses the MyProduct module subscript in the list of installed modules,
and calls the manage_addFolder constructor referenced in the __init__.py
contained in your module.
Hope this makes things a bit clearer,
- seb
--
Seb Potter
Lead Developer
Getfrank Limited