5102 Posts in 1520 Topics by 1116 members
|Go to End|
10 March 2009 at 12:16pm
this is connected to my previous post - but I would like to ask the question a bit more general: Is there a simple way to add an event handler to a page type (or to all pages) without changing the core code?
E.g. could I add a function to /mysite/code/Page.php that executes some code (server side) when a user posts a comment? I've seen onBeforeWrite and onAfterWrite in the API but I'm not quite sure if or how I can squeeze some custom code between a user action (post comment) and the default code that happens in Silverstripe.
|Go to Top|