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

Save and save and publish


Go to End


4 Posts   1130 Views

Avatar
bebabeba

Community Member, 193 Posts

7 July 2010 at 7:15pm

Hi!
I need to intersept the exact poin wich my page is save (for draft site) ans save and publish (for published site). Where are this function?
How my page.php call this?

Thanks!

Avatar
bebabeba

Community Member, 193 Posts

9 July 2010 at 3:37am

help..
I need intercpt save draft site to add that in an other point of my page..

Avatar
Tonyair

Community Member, 81 Posts

9 July 2010 at 5:51am

This is for StaffPage, for the Page is the same

$new = new StaffPage(); // Create new staff page		
$new->populateDefaults(); // if defaults are set
$new->setParent($_POST['ID']); // set parent page
$new -> update(
		array(
			'MenuTitle' => $title,
			'Title' => $title,
			'Locale' => $_POST['Locale'],
			'PhotoID' => $image->ID // adding image
		)
	);
$new->writeToStage('Stage'); // Save Page

Avatar
TotalNet

Community Member, 181 Posts

9 July 2010 at 10:10am