[Zope] Loop over the different levels of PARENTS

Max M maxm@mxm.dk
Tue, 11 Jun 2002 13:02:28 +0200


>
>
>>I want to loop over the different levels of PARENTS to get the id of
>>the ZCatalog. The id of the ZCatalog can be dynamic this way.
>>    
>>

Wouldn't it be easier to just look for "default_catalog" on the object 
you want to find the catalog of?

The object should be catalogued under that catalog.

def getCatalogid(self):
    """gets the id of the ZCatalog used for the News searchin"""
    return self.default_catalog



regards Max M