Copied to clipboard

Flag this post as spam?

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


  • David Amri 214 posts 740 karma points
    Aug 19, 2016 @ 12:49
    David Amri
    0

    Public notification system

    Hi,

    I would like to create some sort of notification feature so that editors could publish messages at the top of the site. I'm new to Umbraco and not sure were to start with this.

    It would be nice if the editor could:

    • Write new messages and then publish

    • Publish previously made messages

    • Edit previously made messages and and then publish

  • Marc Goodson 2157 posts 14434 karma points MVP 9x c-trib
    Aug 21, 2016 @ 11:43
    Marc Goodson
    1

    Hi David

    How you would do this, depends a little bit on whether you need the same message text to appear on different pages of your website at the same time.

    A while ago i worked on a local government website in Umbraco, and different areas of the site needed different Service Alerts! - (http://tridionumbracomigrationtrilogy.monosnow.co.uk/post/43347421069/service-alerts)

    So for example a particular Swimming Pool might be closed next tuesday, and this information needed to be prominently displayed on the Swimming Pool Leisure Centre page, at the top in red, with exclamation marks - but also there existed another page about Swimming at various leisure centres in the area, and so the same text needed to appear there too.

    We created a document type for a 'Service Alert' which featured Title, Text and a dropdown for the severity of the message (how red must it be!) and editors could create these Service Alert 'components' and publish and unpublish them, but obviously they wouldn't appear anywhere yet.

    We created a property on every page of the site, that was a content picker, that was only allowed to pick service alerts, so Editor's could create the alert, and pick for it to appear on various pages.

    The page template looked at this property, and if no alerts were picked, nothing was written out, if an alert were picked, we pulled back the details fo the picked alert and wrote out the Html around it to make it stand out.

    If your messages do not need to be used on multiple pages, you could probably get away with adding just a rich text area to all your pages called 'alertBox' and if an editor types anything in there for an Umbraco node the template could write out the content at the top of the page, but the seperate Service Alert doc type approach and picker is probably more flexible.

    regards

    marc

  • David Amri 214 posts 740 karma points
    Aug 22, 2016 @ 05:37
    David Amri
    0

    Hi Marc,

    Thank you so much for your answer, very useful. As a beginner it really helps getting a "live solution" explained. Helps me figure out what to use and when which I find a bit confusing since Umbraco is very open and does not give you a specific way of doing things.

    I like the first solution you explained even though we don't need the message to be visible more than once. Always at the top placed in the "Master" temlate so it would follow the user around until they close it.

    In your example would the editors be able to pick previously written messages and publish these again or would they need to update the existing text and then publish?

    Also, did you use the Multinode Content Picker or the regular Content Picker?

    Cheers David

  • Marc Goodson 2157 posts 14434 karma points MVP 9x c-trib
    Aug 22, 2016 @ 12:59
    Marc Goodson
    0

    Hi David

    Yes, I like having each message as a seperate node in Umbraco, so it can be unpublished after use, and then reused later when the message is appropriate once more

    (I'm thinking at the council we use to have an annual alert message about when the public fireworks would be, and each year it would have the same-ish text, but only need to be shown once a year)

    so this approach gives the editors a range of common messages to pick from.

    It depends on whether there will ever be more than one message 'at a time' eg ContentPicker will allow you to pick one, Multinode Tree Picker will allows editors to choose 2 or 3 and order...

    But having lots of alerts on a page can be annoying, and detract from them being alerts!!

    regards Marc

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies