[Zope] ZClass Catalog Update

Dieter Maurer dieter at handshake.de
Sat Jan 17 18:12:58 EST 2004


KJZZ Webmaster wrote at 2004-1-16 14:59 -0700:
> ...
><dtml-call "Catalog.manage_catalogReindex(REQUEST, RESPONSE, URL1)">
> ...
>The thing is, when I click on this tab, it updates the entire Catalog.

"manage_catalogReindex" does what it name tells:
it reindexes the catalog (a "well chosen name", I call this).

> ...
>My questions are these:
>
>1)  Is there a way to update only the individual ZClass object in the
>catalog

The method is "catalog_object" -- it, too, has a well chosen name ;-)

> ...
>2) What is the best way to deal with the permissions for this?

A proxy role (read about them in the Zope Book, 2.6 edition).

>...
>3) Additionally, I notice that when an object gets cataloged initally, the
>path to the object (as viewed in the Catalog) is from the root of the site,
>such as /myfolder/myobject.
>
>However, if I were to recatalog the site from the Control Panel, the path to
>the object now changes to:
>  /mysite/myfolder/myobject

Please try to be precise when you describe problems:

  The "Control_Panel" does not allow you to recatalog anything.

It is strange that "manage_catalogReindex" should change
the path. In fact, it recatalogs the object with its original
path. You must mean a different path (not the one returned
via the "getPath" method).

There are 2 base classes providing path awareness for ZCatalog:
the old "ZCatalogAware" and the newer "ZCatalogPathAware".
You should always use the new one (as the old one does not
work with virtual hosting).

-- 
Dieter



More information about the Zope mailing list