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
I have some problems and have no idea, how to show a dialog popup on SavingContent event in method HandleAsync. Some code here:
public class ContentSavingNotificationHandler : INotificationAsyncHandler<ContentSavingNotification>
private readonly IContentService contentService;
private readonly IEventService eventService;
public ContentSavingNotificationHandler(IContentService contentService
, IEventService eventService)
this.contentService = contentService;
this.eventService = eventService;
public Task HandleAsync(ContentSavingNotification notification, CancellationToken cancellationToken)
// want to show popup from here
has somebody idea how to do it?
Could you elaborate on what exactly you are trying to achieve?
As far as I know, it's not a thing to trigger a popup in the frontend from an event in the backend, especially because an event can also be fired from background processes.
hi, thanks you for your interest. What I want to do? I want to show a dialog window ( just after press save/publish button, and before save method ), where user can do some confirmation ( if clicks Ok - save procedure continues, else stop - save process is canceled )...
Ah, I see. Well once the users clicks on save or save & publish, this action is set in motion and once your event handler triggers, it's too late to give your users any options.
To change the behaviour on save or on save & publish, you'd have to do some magic to the buttons in the umbraco backoffice.
Here is an example of a plugin that changes the behaviour on certain buttons by intercepting the request that gets the html for the button and replacing it with a new implementation.
It's a complicated process and should be considered a hack. You may want to consider an alternative.
is working on a reply...
Write your reply to:
Image will be uploaded when post is submitted