[Zope] creating product instances using dtml

Thomas Guettler zopestoller@thomas-guettler.de
Tue, 05 Mar 2002 10:51:41 +0100


Micah Martin wrote:

>Howdy All,
>
>  I've been trying to figure out how to make instances of a product without
>using the management interface.  For example, lets say my product is called
>MyProduct and I've defined manage_addMyProduct in the .py file.
>I can create the object by spoofing urls, but I'd like to be able to create
>the object using dtml.  I've tried:
><dtml-call expr="someFolder.manage_addMyProduct('someId')">
>but the manage_addMyProduct method can't be found. Does anyone know how this
>is done?
>
Do it like this:
new_zcatalog=context.manage_addProduct['ZCatalog'].manage_addZCatalog(id='new_id1')

I found it on: http://www.zopelabs.com/cookbook/1012279676

guettli