Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
public class DocumentEventHandlerRegistration : ApplicationEventHandler
{
protected override void ApplicationStarted(UmbracoApplicationBase umbracoApplication, ApplicationContext applicationContext)
{
ContentService.Saving += ContentService_Saving;
}
private void ContentService_Saving(IContentService sender, SaveEventArgs<IContent> e)
{
if (e.SavedEntities.FirstOrDefault().ContentType.Alias == "documentTypeA")
{
// Do stuff
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.