[Zope] Zclasses derived from ZCatalog
Wed, 03 Nov 1999 09:31:15 +0000
Tres Seaver wrote:
> Tom Schwaller <firstname.lastname@example.org> wrote:
> > http://www.zope.org/Members/Zen/tips/tip_ZCatalogInZClass
> > shows nicely how to add a ZCatalog in a ContainerClass.
> > How does one implement the same functionality
> > when deriving a class A from ZCatalog:
> > A(ZCatalog) -- B(CatalogAware)
> Check out my How-To, http://www.zope.org/Members/tseaver/inherit_ZCatalog
cool, thanks a lot.
PARENTS.id is what I was looking for :-) (I forgot the .id)
> > How to modify
> > <dtml-with "Catalog">
> > <dtml-call "manage_addColumn('area',REQUEST,RESPONSE,URL1)"> ?
> Just call the method (of the ZCatalog-derived class):
> <dtml-call "manage_addColumn( 'area', REQUEST, RESPONSE, URL1 )">
ok, I'll try that...
> > <dtml-with _catalog>
> > will not work.
> Right, attributes/methods starting with "_" are invisible to DTML.
> I like deriving from ZCatalog, so the users do not see
> the Catalog (otherwise one could delete it) and the
> ContainerClass (Books) is the catalog of its members (Book).
> Any hints?
> 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