Eventhandler subscribing to deleting nested content
Hi,
I have an umbraco 8 solution running where i'm saving umbraco documents in a separate database and most of it is working fine. I followed the official documentation on subscribing to events and I'm using the ContentService.Trashing event handler when I want to remove the removed umbraco content from my database also - this also works.
My problem is that i want to delete some of the nested content I have stored on one of my document types, but the eventhandler is only triggered when deleting the content of a doc type and not when deleting items in the Umbraco.NestedContent
edit: here is the implementation of the trashing eventhandler so far.
I couldnt find anything about this issue, but i'm hoping that someone has an idea how to trigger the trashing of nested content?
Hey Tobias - I see this is a pretty old question but I'm curious if you ever got this sorted. I need the same thing except for on adding a new nested content. Because nested content has a flag for "confirm deletes" there must be some events somewhere
I am not entirely sure but i don't think Umbraco gives any events for these, its just content in the end. You can only get events like ContentDeletedNotification, ContentPublishingNotification etc (on newest versions).
On the other hand you could try something with angular.
Eventhandler subscribing to deleting nested content
Hi,
I have an umbraco 8 solution running where i'm saving umbraco documents in a separate database and most of it is working fine. I followed the official documentation on subscribing to events and I'm using the ContentService.Trashing event handler when I want to remove the removed umbraco content from my database also - this also works.
My problem is that i want to delete some of the nested content I have stored on one of my document types, but the eventhandler is only triggered when deleting the content of a doc type and not when deleting items in the Umbraco.NestedContent
edit: here is the implementation of the trashing eventhandler so far.
I couldnt find anything about this issue, but i'm hoping that someone has an idea how to trigger the trashing of nested content?
Thanks!
Hey Tobias - I see this is a pretty old question but I'm curious if you ever got this sorted. I need the same thing except for on adding a new nested content. Because nested content has a flag for "confirm deletes" there must be some events somewhere
Even more necro posting on the topic of nested content events...
Anyone ever found a solution for this?
I am not entirely sure but i don't think Umbraco gives any events for these, its just content in the end. You can only get events like ContentDeletedNotification, ContentPublishingNotification etc (on newest versions).
On the other hand you could try something with angular.
is working on a reply...