Jump to:

5541 Posts in 1738 Topics by 1224 members

Customising the CMS

SilverStripe Forums » Customising the CMS » add custom event handler?

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

Page: 1
Go to End
Author Topic: 930 Views
  • Anatol
    Avatar
    126 Posts

    add custom event handler? Link to this post

    Hi,

    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.

    Cheers!
    Anatol

    930 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.