[Zope] Zclasses derived from ZCatalog

Martijn Pieters mj@antraciet.nl
Wed, 03 Nov 1999 16:55:24 +0100


At 16:31 03/11/99 , Tres Seaver wrote:
>Martijn Pieters wrote:
> >
> >
> > >CAVEAT:
> > >
> > >I haven't yet figured out how to use the Catalog-method inside other DTML,
> > >e.g.,
> > >
> > >   <dtml-in "Catalog( meta_type='BarBaz' )">
> > >     ...
> > >   </dtml-in>
> > >
> > >doesn't work.  I'll think on it some more.
> >
> >    <dtml-in "_['Catalog'](meta_type='BarBaz')">
> >
> > will work, but not with a real Catalog object, only your DTML trickery.
>
>Hmm, I can't seem to make that work:
>
>   ZClass Foo( ObjectManager, ZCatalog )
>   \
>    ZClass Bar( CatalogAware, ObjectManager )
>    \
>     ZClass Baz( CatalogAware )
>
>I can add Bars and Bazzes within a Foo, and they show up in its
>manage_catalogView.  I tried defining a DTML method using your syntax in 
>either
>Foo or Bar to (say) list all the Bazzes, like so:
>
>   <dtml-var standard_html_header>
>
>   <UL>
>     <dtml-in "_['Catalog'](meta_type='Baz')">
>       <LI> <dtml-var id>
>     </dtml-in>
>   </UL>
>
>   <dtml-var standard_html_footer>
>
>But I can't execute it -- I get "You are not authorized to access 
>Catalog".  If
>I tweak the permission map a bit for Foo (Access Content Information->Access
>Content Information), I then get "You are not authorized to access this".
>
>So, I give the Catalog method a "Manager" proxy.  Now, I get:
>
>   Error Type: AttributeError
>   Error Value: __getitem__
>
>--
>=========================================================
>Tres Seaver         tseaver@palladion.com    713-523-6582
>Palladion Software  http://www.palladion.com
>
>_______________________________________________
>Zope maillist  -  Zope@zope.org
>http://lists.zope.org/mailman/listinfo/zope
>
>(Related lists - please, no cross posts or HTML encoding!
>
>To receive general Zope announcements, see:
>http://lists.zope.org/mailman/listinfo/zope-announce
>
>For developer-specific issues, zope-dev@zope.org -
>http://lists.zope.org/mailman/listinfo/zope-dev )

--
Martijn Pieters, Web Developer
| Antraciet http://www.antraciet.nl
| Tel: +31-35-7502100 Fax: +31-35-7502111
| mailto:mj@antraciet.nl http://www.antraciet.nl/~mj
| PGP: http://wwwkeys.nl.pgp.net:11371/pks/lookup?op=get&search=0xA8A32149
------------------------------------------