Jump to:

23374 Posts in 18175 Topics by 2866 members

General Questions

SilverStripe Forums » General Questions » Save and save and publish

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

Page: 1
Go to End
Author Topic: 819 Views
  • bebabeba
    Avatar
    Community Member
    192 Posts

    Save and save and publish Link to this post

    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!

  • bebabeba
    Avatar
    Community Member
    192 Posts

    Re: Save and save and publish Link to this post

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

  • Tonyair
    Avatar
    Community Member
    81 Posts

    Re: Save and save and publish Link to this post

    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

  • TotalNet
    Avatar
    Community Member
    181 Posts

    Re: Save and save and publish Link to this post

    819 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.