Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
We are on Umbraco 10.4 and need to intercept the Recycle Bin's "Delete..."
Does anyone know how to do this?
Is there an Event Handler for this?
Thanks
Tom
This is the eventHandler that does the trick ContentDeletedNotification So for me in my C# .netCore6.0 project I added this line public void ConfigureServices(IServiceCollection services) {
.AddNotificationHandler<ContentDeletedNotification, DeleteItemFromRecycleBin>()
Then I created this class
using Umbraco.Cms.Core.Events; using Umbraco.Cms.Core.Notifications;
namespace PWS.CMS { public class DeleteItemFromRecycleBin : INotificationHandler
public DeleteItemFromRecycleBin(ILogger<DeleteItemFromRecycleBin> logger) { _logger = logger; } public void Handle(ContentDeletedNotification notification) { foreach (var recycleBinItem in notification.DeletedEntities) { _logger.LogInformation("{ContentName} was published", recycleBinItem.Name); } } }
}
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
Event Handler for Recycle Bin's Delete...
We are on Umbraco 10.4 and need to intercept the Recycle Bin's "Delete..."
Does anyone know how to do this?
Is there an Event Handler for this?
Thanks
Tom
This is the eventHandler that does the trick ContentDeletedNotification So for me in my C# .netCore6.0 project I added this line public void ConfigureServices(IServiceCollection services) {
Then I created this class
using Umbraco.Cms.Core.Events; using Umbraco.Cms.Core.Notifications;
namespace PWS.CMS { public class DeleteItemFromRecycleBin : INotificationHandler
}
is working on a reply...