Hi,
Following Problem:
If a static Portlet on the Site, the Filter is also present "in" the Portlet, what should i do when i want only aply the filter in the HTML-Text of Document, not of Portlet. Is there a restriction in the 'for' Attribute of Adapter Definition?
i register an adapter for a custom outputfilter in configure.zcml:
As I understand output filters (my understanding is likely partial), they operate on whole responses, not individual parts of them. This implies that an output filter registered for "Document"s applies whenever you view a "Document" and operates on the main "Document" content as well as all the rest (navigation, portlets, ...). When you must restrict the transformation to a part of the response, do it in your filter, i.e. you locate the relevant part[s] and transform only therein.
Hmm, i can modify the HTML Text in an extra BrowserView, I thought that the outpufilters are the better option. My aim is, to render all possible Terms with a Link to Contentsites which Title contains the Term. But i have no Experience with the Runtime and the Performance. Perhaps, i do this with a Eventhandler or a "CronJob", if the Performance of On-The-Fly-Rendering are bad. I would reporting the results.
IIRC the RichText cookedBody is transformed and then cached on Document content objects until the next edit of that document. So if you're able to hook into that cooking mechanism you'd have an elegant and performant solution.
I have to do this at first time like described in the docs, but i don't want to transform the output of the Static Portlet which is on the same site. But my Filter is running also in the Static Portlet with the Definition 'for='* *''
Ok, Should i register my own Outputfilter with a Name e.g. 'text/x-wiki-safe' via setuphandlers? Is this necessary? I could imagine, that this step is also needed. Later in my BrowserView i can do this: