Jump to:

5540 Posts in 1738 Topics by 1224 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: 1380 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
    1792 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
    }

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