[Zope] Zclasses derived from ZCatalog
Wed, 03 Nov 1999 07:22:24 -0600
Tom Schwaller wrote:
> Tres Seaver wrote:
> > This is essentially what I am doing -- I just tried adding a DTMLMethod named
> > "Catalog" to the ZCatalog-derived class, which just returns this() -- IT WORKS!
> Could you explain that with code? I'm not exactly shure hoh you do that.
> With that you do not need
> <dtml-call "manage_editCataloger( PARENTS.id, REQUEST )">
> anymore. Is that right? You should ad this very cool trick
> to your howto (this will be my number 1. Zope magic Trick for this week
Add a DTML Method named "Catalog" to the ZClass derived from ObjectManager and
ZCatalog. its body should be:
The CatalogAware ZClass instances search up the acquisition tree for on object
named Catalog to register with -- they find the method as an attribute of their
container, and use it instead.
I haven't yet figured out how to use the Catalog-method inside other DTML, e.g.,
<dtml-in "Catalog( meta_type='BarBaz' )">
doesn't work. I'll think on it some more.
Tres Seaver firstname.lastname@example.org 713-523-6582
Palladion Software http://www.palladion.com