[Zope-CMF] Modifying SearchableText...? How...?
Florent Guillaume
fg@nuxeo.com
Mon, 23 Sep 2002 12:32:08 +0000 (UTC)
Chris Withers <chrisw@nipltd.com> wrote:
> > If a class has a function named SearchableText then I don't think you can
> > override it by making a python script and place it in portal_skins 'sutom'
> > folder ??
> > You will need to modify the function in the python module ..
>
> Good call, I think that's exactly what's happening...
>
> ...and it's a shame. Could someone file a collector issue so that this
> method is
> always obtained from the skin?
>
> (Only trickyness is that you'll probably want to behave differently for each
> content type. How do we make this happen using the skins architecture?)
You can't easily. Skins in CMF are not able to do that.
One way to do it would be to define a new action 'searchabletext' in the
Types Tool, and your new SearchableText would find it using
getActionById and call it (like the 'view' method of PortalContent
does), but that's *slow*
A much cleaner way would be to wait for Zope 3.
Florent
--
Florent Guillaume, Nuxeo (Paris, France)
+33 1 40 33 79 87 http://nuxeo.com mailto:fg@nuxeo.com