[Zope-dev] Newbie Alert: creating Products with DTML

Ray zopelist@circle17.com
Wed, 26 Apr 2000 14:48:39 -0600


I'm fairly new to Python & Zope and am hoping someone could lend a hand....


How would one go about instantiating a 'Product' via DTML?  Such as, for
example, a ZCatalog? I'm tried the following (arguments may not be exact
here):

<dtml-call "manage_addZCatalog('Catalog')">

<dtml-call "Control_Panel.Products.ZCatalog.manage_addZCatalog('Catalog')">
(hoping I can call the "static" method in the ZCatalog definition)

<dtml-with "addProduct['ZCatalog']">
    <dtml-call "manage_addZCatalog('Catalog')">
                         or (after adding appopriate Properties to REQUEST)
    <dtml-call "manage_addZCatalog(_.None, _)">
</dtml-with>


Is it possible to access the manage_addZCatalog method directly (as is the
case with internal classes, such as Image's manage_addImage)?  How exactly
is it that the 'internal' classes have their manage_add* methods in the
Global Namespace?  Or, are they actually part of the Zope tree (off root?),
thus available via acquisition?

Thanks.....