This is a very old school way of doing this, but you could use a PythonScript for the method, and register the metadata in a genericsetup profile.
JJ From: [email protected] [mailto:[email protected]] On Behalf Of Luciano Pacheco Sent: Wednesday, June 23, 2010 2:20 PM To: David Glick Cc: [email protected] Subject: Re: [Product-Developers] Catalog a calculated metadata On Wed, Jun 23, 2010 at 12:11 PM, David Glick <[email protected]> wrote: On Jun 23, 2010, at 8:07 AM, Luciano Pacheco wrote: On Wed, Jun 23, 2010 at 11:26 AM, David Glick <[email protected]> wrote: On Jun 23, 2010, at 5:14 AM, Luciano Pacheco wrote: > Hi all, > > Since February out from Plone community, last month I came back work with Plone to Brazilian government. > > I did a new catalog for some expensive values and I want to catalog as a metadata a set of calculated values. > > The main question is: I want to code a function that can operates on the object, like which I can do with the "registerIndexableAttribute" to indexes. > > The dumb way is add at runtime a new method to the desired content type (PloneArticle in my case). > > Any ideas ? In Plone 3.3+ you can use a custom indexer adapter (see plone.indexer) David David, But I need the metadata, not a index. I'm at a Plone 3.1.7 I read: http://plonemanual.twinapex.fi/searching_and_indexing/catalog.html http://plonemanual.twinapex.fi/searching_and_indexing/indexing.html#custom-i ndex-methods I believe index values and metadata values are both obtained the same way, via a wrapper that takes into account the indexers (or methods registered via registerIndexableAttribute in Plone < 3.3). Did you try it? David It worked. Thanks a lot! :-) -- Luciano Pacheco blog.lucmult.com.br
_______________________________________________ Product-Developers mailing list [email protected] http://lists.plone.org/mailman/listinfo/product-developers
