[Zope] ZCatalog and custom Product

Milos Prudek prudek at bvx.cz
Wed Apr 20 05:15:34 EDT 2005


Milos Prudek wrote:
 > Hi,
 >
 > I need to convert a ZClass cataloged in multiple ZCatalogs into a
 > Product. I know how to create a Product. But I have trouble
 > understanding how to create a proper ZCatalog and manage it in a Product.

To answer myself, simply follow Garito's advice of 10.6.2004 in mailing 
list archive.

Now the only problem is multiple catalogs. I need to catalog my class 
into Catalog_A, Catalog_B and Catalog_C upon instantiation.

class MyClass(CatalogPathAware....):
   def __init__(....):
     self.manage_editCataloger("Catalog_A")
     self.index_object()

The above code catalogs the instance into Catalog_A. Okay, but....

     self.manage_editCataloger("Catalog_A")
     self.index_object()
     self.manage_editCataloger("Catalog_B")
     self.index_object()
     self.manage_editCataloger("Catalog_C")
     self.index_object()
... the above code catalogs the instance into Catalog_C, but not into 
Catalog_A and not into Catalog_B. Does anyone know why Catalog_A and 
Catalog_B are ignored?

-- 
Milos Prudek


More information about the Zope mailing list