2

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?

1

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

0

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.

0

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

https://stackoverflow.com/questions/38725815/sharepoint-2013-save-button-in-the-ribbon-cancel-saving-if-form-not-valid/38795197#38795197

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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