[Zope] Catalog without a Z
Max M
maxm at mxm.dk
Thu Mar 4 14:40:47 EST 2004
Andre Meyer wrote:
> Dear Zopers
>
> The Zope Book explains the use of ZCatalog for indexing and searching
> (http://zope.org/Documentation/Books/ZopeBook/2_6Edition/SearchingZCatalog.stx).
> However, I want to use Catalog (and not ZCatalog) in my
> file-system-based product. I use a Folder object to which I add custom
> objects using self._setObject(id, item).
>
> Does anybody have a good example of what is needed for this purpose?
> What are the preconditions for indexing/searching in this context?
"ZCatalog" is the class name. Normally you have an instance of this
class with the id of "Catalog"
I that case you only need to subclass CatalogAware:
from Products.ZCatalog.CatalogPathAwareness import CatalogAware
class AProduct(CatalogAware, other mixins...):
etc...
regards Max M
More information about the Zope
mailing list