Hi, the functionality in Umbraco that lets user's subscribe to notifications is really neat, however, as it works on all children of a parent is it possible to cancel the sending of notifications based on document type?
No, it's not possible to prevent notifications without having to do some major hacking of your system. To achieve it you would need to unsubscribe the user programmatically from the node(s), then once the publish event has completed you then resubscribe.
To do this you're likely going to have to modify the core of Umbraco (and then again, id you're doing that you may as well find a better way to do it :P) since it's not something that's ever been a OOTB-required feature.
If you're interested notifications are sent in the umbraco.cms.businesslogic.workflow.Notification.GetNotification method
OK. Not a problem. I know this is not a common requirement and the only time it ever happens is when you have a structure similar to this:
Blog Posts -- Blog Post ---- Comment
The admin either has to subscribe individually to each blog post as it is published, or subscribe to the Blog Posts folder. If they subscribe to the blog posts folder then they receive notifications when a comment is received and when a blog post is published. Can I assume it would be correct to use the document API events to subscribe the admin to the Blog Post when it is created?
Cancelling notification through the API
Hi, the functionality in Umbraco that lets user's subscribe to notifications is really neat, however, as it works on all children of a parent is it possible to cancel the sending of notifications based on document type?
No, it's not possible to prevent notifications without having to do some major hacking of your system. To achieve it you would need to unsubscribe the user programmatically from the node(s), then once the publish event has completed you then resubscribe.
To do this you're likely going to have to modify the core of Umbraco (and then again, id you're doing that you may as well find a better way to do it :P) since it's not something that's ever been a OOTB-required feature.
If you're interested notifications are sent in the umbraco.cms.businesslogic.workflow.Notification.GetNotification method
OK. Not a problem. I know this is not a common requirement and the only time it ever happens is when you have a structure similar to this:
Blog Posts
-- Blog Post
---- Comment
The admin either has to subscribe individually to each blog post as it is published, or subscribe to the Blog Posts folder. If they subscribe to the blog posts folder then they receive notifications when a comment is received and when a blog post is published. Can I assume it would be correct to use the document API events to subscribe the admin to the Blog Post when it is created?
Cheers!
Yeah your only other option is to use the Umbraco event model and send the email yourself.
That'd be less coding as well.
is working on a reply...