I want to override SaveandPublish button functionality. whenever any editor add or update any content for specific document type then i need to do some extra data analysis and then save it.
So could you please help me to know, how can i override it for specific document type.
Thanks for your help. But issue with this solution is INotificationHandler class execute when website load and when editor publish any content.
But I need solution, in which when editor publish any content then only function execute not when website load. If i use this solution then website taking more time to load.
There are other notifications too... further down in the page..
If I want to do some extra analysis of what has been entered then I tend to handle this when the editor has made the content update, so I would normally use the 'ContentSavingNotification' - that way the editor is made aware of the problem when it is created, rather than a later date if they are not immediately publishing...
(That said the 'ContentPublishingNotification' should only be fired when an editor presses publish on a page, not when the site starts up, and builds the published cache, but maybe there is a bug with Vlatest Umbraco as I've not seen this before)
Override Umbraco Editor SaveandPublish button functionality
Hi Team,
I want to override SaveandPublish button functionality. whenever any editor add or update any content for specific document type then i need to do some extra data analysis and then save it.
So could you please help me to know, how can i override it for specific document type.
Hi Mahender
Whenever content is saved or published in Umbraco, different notifications are broadcast.
https://docs.umbraco.com/umbraco-cms/reference/notifications/contentservice-notifications
You can then write code to subscribe to these noitificatiins and do your custom stuff, or in some cases cancel the saving or publishing.
Regards
Marc
Hi Marc,
Thanks for your help. But issue with this solution is INotificationHandler class execute when website load and when editor publish any content.
But I need solution, in which when editor publish any content then only function execute not when website load. If i use this solution then website taking more time to load.
So please help me in that case.
Hi Mahender
There are other notifications too... further down in the page..
If I want to do some extra analysis of what has been entered then I tend to handle this when the editor has made the content update, so I would normally use the 'ContentSavingNotification' - that way the editor is made aware of the problem when it is created, rather than a later date if they are not immediately publishing...
(That said the 'ContentPublishingNotification' should only be fired when an editor presses publish on a page, not when the site starts up, and builds the published cache, but maybe there is a bug with Vlatest Umbraco as I've not seen this before)
Anyway, give ContentSavingNotification a try!
regards
Marc
is working on a reply...