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.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

General Questions /

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

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

How does the publishingMechanism work ?


Go to End


4 Posts   1179 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...