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!
This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.
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.
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!
help..
I need intercpt save draft site to add that in an other point of my page..
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
Have you tried onBeforeWrite?
http://doc.silverstripe.org/datamodel#onbeforewrite