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

Kevin Dangoor kid@kendermedia.com
Wed, 26 Apr 2000 17:06:13 -0400


Hi,

    You might check out KM|Net News. In the current version, the
KMArticleStore_add method creates a ZCatalog.


----- Original Message -----
From: "Ray" <zopelist@circle17.com>
To: "zope-dev" <zope-dev@zope.org>
Sent: Wednesday, April 26, 2000 4:48 PM
Subject: [Zope-dev] Newbie Alert: creating Products with DTML


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

Make that "manage_addProduct['ZCatalog']"

>
>
> 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?

Basically, that's correct. I believe those objects are in the lib/python/OFS
directory. ZCatalog was written as a separate "Zope Product", so you need to
use the product syntax to instantiate it.

Kevin