Jump to:

5513 Posts in 1732 Topics by 1218 members

Customising the CMS

SilverStripe Forums » Customising the CMS » implement 'Save and publish' button

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

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

    implement 'Save and publish' button Link to this post

    Hi!
    I need add a functionality in my admin CMS area when I click on 'save and published' button. I'm unable to find exact point and exact function. Help please..
    For 'save' button I modifiy onBeforeWrite() function.
    And How can I change messages after save?
    Thanks

  • swaiba
    Avatar
    Forum Moderator
    1784 Posts

    Re: implement 'Save and publish' button Link to this post

    assuming you want to do something after the publish... this is what I'd start with...

    in your data object override the publish function...

    function publish($fromStage, $toStage, $createNewVersion = false)
    {
    parent::publish($fromStage, $toStage, $createNewVersion);

    //do stuff
    }

    1366 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.