[Zope-CMF] IndexableObjectWrapper

Martin Aspeli optilude+lists at gmail.com
Mon Mar 9 22:28:58 EDT 2009


Miles wrote:
> Hi,
> 
> Can anyone tell me if it is possible to register an adapter to provide a 
> different IndexableObjectWrapper class from the stock CMF one?  There's 
> some sort of framework code that hints that it ought to enable this, but 
> I can't see how!
> 
> The code still seems to instantiate the wrapper directly using the 
> class, rather than looking it up via the component architecture.
> 
> Can anyone explain what's going on?  I've drawn a blank from googling 
> for examples.

In plain CMF, probably not. In Plone, we have a custom CatalogTool which 
does let you provide a new wrapper wholesale based on object type.

In Plone 3.3, we'll *also* have a means of providing individual 
*attributes* of the wrapper via adapters. See 
http://pypi.python.org/pypi/plone.indexer. This package should work with 
stock CMF (though you'll need to wire it into the catalog tool yourself).

Martin

-- 
Author of `Professional Plone Development`, a book for developers who
want to work with Plone. See http://martinaspeli.net/plone-book



More information about the Zope-CMF mailing list