[Zope] Re: automatically add to ZCatalog?

Maik Jablonski maik.jablonski@uni-bielefeld.de
Thu, 21 Nov 2002 12:46:55 +0100


tom smith wrote:
> I have a blog where a search show the latest BlogItems ordered by date
> 
> I've looked everywhere and can't work out how to automatically add a 
> BlogItemClass instance to my ZCatalog.

You must make your Product CatalogAware:

from Products.ZCatalog.CatalogPathAwareness import CatalogAware

class BlogClass(CatalogAware, ...):

Depending on your Product you have to call self.reindex_object() after 
changes [esp. for the PropertyManager, which is not CatalogAware by 
default].

-mj

-- 
German Zope User Group
http://www.dzug.org/