21278 Posts in 5728 Topics by 2599 members
|
Page:
1
|
Go to End | |
| Author | Topic: | 665 Views |
-
Save and save and publish

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!
-
Re: Save and save and publish

9 July 2010 at 3:37am
help..
I need intercpt save draft site to add that in an other point of my page.. -
Re: Save and save and publish

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 -
Re: Save and save and publish

9 July 2010 at 10:10am
Have you tried onBeforeWrite?
http://doc.silverstripe.org/datamodel#onbeforewrite
| 665 Views | ||
|
Page:
1
|
Go to Top |


