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
On a particle Doctype Publishing, we've got a lot of stuff happening in the background. Such as, creating folders, members and content. This can take ~30 seconds. So we would just like to give the user a friendly bit of feedback "Please wait"
Only references I can find regarding the use of the NotificiationsService relate to the client-side AngularJS but as we're not using any custom property editors here, we'd just like to hook into the Publish event to give the user a friendly bit of feedback.
Is this possible?
You can try now add a custom message when cancelling the Publish event inside your event code via:
e.Messages.Add(new EventMessage("Mwahahahaha!","I have cancelled your publishing!", EventMessageType.Error));
and this will bubble up to the NotificationsService;
Worth a try is:
e.Messages.Add(new EventMessage("Hang On","We're saving lots of stuff", EventMessageType.Warning));
but I have a feeling it will only fire after the stuff has happened....
(see this issue for the discussion that led to the above: http://issues.umbraco.org/issue/U4-5927)
Sometimes if there is a big delay in lots of things happening automatically after publish, it's worth, just using the event to store the id of the published node into a queue; and then have all the automatic stuff happen on a different thread working off of the queue; but it depends on what you are doing etc...
is working on a reply...
Write your reply to:
Image will be uploaded when post is submitted