Content Definition and Module Definition Custom Scripts

Follow

Module and Content Definitions have a custom scripts section under Form Customization tab that can be used to run custom logic.

formcustomization.png

You can hook to on load, on before save, on after save, on before publish and on after publish events.

contentViewModel.CustomEvents = { 
onLoad: function (contentItem) {
//PERFORM TASKS ON ITEM LOAD
},
onBeforeSave: function (contentItem, onContinue, onCancel) {
//PERFORM TASKS BEFORE SAVE
//use the onCancel callback function to cancel the save
onContinue();
},
onAfterSave: function (contentItem, onContinue) {
//PERFORM TASKS AFTER SAVE onContinue();
},
onBeforePublish: function (contentItem, onContinue, onCancel) {
//PERFORM TASKS BEFORE PUBLISH
//use the onCancel callback function to cancel the save
onContinue();
},
onAfterPublish: function (contentItem) {
//PERFORM TASKS AFTER PUBLISH
}
};
0 out of 1 found this helpful

Comments

0 comments

Please sign in to leave a comment.