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   672 Views

Avatar
Neobe

Community Member, 7 Posts

14 October 2009 at 2:54am

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

Community Member, 501 Posts

14 October 2009 at 3:54am

Hi,

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

Avatar
Neobe

Community Member, 7 Posts

14 October 2009 at 4:08am

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

Community Member, 501 Posts

14 October 2009 at 4:17am

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