Virtual Happy Hour is canceled this month (March) due to Good Friday.
Try our conversational search powered by Generative AI!
AI OnAI Off
Virtual Happy Hour is canceled this month (March) due to Good Friday.
Hi
I haven't tested this myself but there two static events on ContentTypeRepository (ContentTypeSaved and ContentTypeDeleted), that I think you should be able to use to handle this scenario.
Regards
Per Gunsarfs
Hi,
Thanks for your reply. Can confirm the below logic works.
protected void Application_Start() { ContentTypeRepository.ContentTypeSaved += (sender,eventArgs) => { // Logic here }; }
Hey Luke,
Just a small side-note. You should rather use an initialization module to subscribe to events. Read more https://world.episerver.com/documentation/developer-guides/CMS/initialization/
They will get re-executed in case of an exception + you can add dependencies. A very similar example to yours: https://world.episerver.com/documentation/developer-guides/CMS/initialization/Creating-an-initialization-module/
BR,
Marija
Hi,
I'd like to implement some additional CMS auditing to record when any changes are made to a page type by a user within the CMS (Such as adding a new property, or removing an existing property).
I was hoping that there would be an event or something similar that I can hook into but am having trouble identifying anything suitable.
Has anyone accomplished a similar thing?
Thanks.