Is there a way to override Ribbon Save Button functionality in publishing page of specific page layout? My intention is not to override it for all publishing pages but to limit it to specific page layout?

3 Answers 3


please create a javascript function PreSaveAction() in your page layout. In presave action will fire when you click on save button. You can write any javascript code in this function which needs to be perform just before saving the page.

This is working fine in sharepoint list, but I have not tried in publishing page


You could a create a new control deriving from the original, and add it to a custom masterpage.

I don't know if it's wise to do this in a page layout because the ribbon is on the masterpage. jQuery would be a solution here, you could just add a script in a head content placeholder on your pagelayout to enable it there only.


You may block the native SharePoint javascript when you click the button, and then run your code. See here:


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.