[Zope-CMF] Query portal_catalog for current object?

Jon Edwards jon@pcgs.freeserve.co.uk
Mon, 28 Jan 2002 01:08:09 -0000


This may be a simple question, but I've hunted around and can't find any
docs that cover it :-)

Is it possible to query the portal_catalog to find info on a specific
object, when you are viewing/editing that object? Something like -
here.portal_catalog(this_item_id).Site

I want to store some dynamically-generated values in the catalog - a bit
like Seb's example of Subclassing the catalog-tool -
http://cmf.zope.org/Members/seb/CreateCatalogTool/view - where the "Site"
property is generated dynamically by a Pythonscript when the object is
indexed. But then I want to be able to access the property in View/Edit
pages for an object.

Hope that makes sense?

Cheers, Jon