Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

General Questions

General questions about getting started with SilverStripe that don't fit in any of the categories above.

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

How does the publishingMechanism work ?


Reply

4 Posts   618 Views

Avatar
Neobe

14 October 2009 at 2:54am Community Member, 7 Posts

Hi there,

I want to call a function before publishing content...

Could anyone explain me how exactly the publishing mechanism in SS works ?

Thaks a lot

Best regards
Neobe

Avatar
dio5

14 October 2009 at 3:54am Community Member, 501 Posts

Hi,

Have a look at http://api.silverstripe.com/cms/SiteTree.html#onBeforeWrite, you can call that in your Page class.

Avatar
Neobe

14 October 2009 at 4:08am Community Member, 7 Posts

Hi dio5,

thanks a lot for your quick response, I´ll try that.

But could you also explain me how exactly the publishing mechanism works in SS ?

Best regards
Neobe

Avatar
dio5

14 October 2009 at 4:17am Community Member, 501 Posts

Hmm, I think you better take a look at the code for that in SiteTree.php etc...