Hi,
my purpose is to modify page content in a separate module to cloak email addresses. I have made an Extension class and applied it to SiteTree. Inside the Extension class I have a public function Content() which does the stuff I want and the function itself works fine. The whole thing is working well on every Page object, but when I go to Contact page that is of type UserDefinedForm, my custom function does not have any effect. I guess it's never called because UserDefinedForm overrides it. I have tried to apply the extension also directly to UserDefinedForm instead of via SiteTree, but with no luck. How to make my function affect everything that is derived from SiteTree?
Another, closely relating question is that what would be the easiest way to do some 'search and replace' style content modification that replaces keywords (or regex patterns) with values? Is the only way to perform a string search operation on the Content property of Page (or whatever class) or does SilverStripe provide some more sophisticated way to do this?
Thank you for your support!