Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • david 46 posts 81 karma points
    Jun 01, 2010 @ 11:08
    david
    0

    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?

  • Aaron Powell 1708 posts 3046 karma points c-trib
    Jun 01, 2010 @ 15:49
    Aaron Powell
    0

    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

  • david 46 posts 81 karma points
    Jun 01, 2010 @ 16:31
    david
    0

    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!

     

  • Aaron Powell 1708 posts 3046 karma points c-trib
    Jun 02, 2010 @ 03:28
    Aaron Powell
    0

    Yeah your only other option is to use the Umbraco event model and send the email yourself.

    That'd be less coding as well.

Please Sign in or register to post replies

Write your reply to:

Draft