Content Definition and Module Definition Custom Scripts

Follow

Module and Content Definitions have a custom scripts section under More Actions > Settings

This can be used to run custom logic. 

tab1.PNG


taba2.PNG

You can hook to on load, on before save, on after save, on before publish and on after publishing 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
}
};
3 out of 4 found this helpful

Comments

0 comments

Please sign in to leave a comment.