Streaming live at 10am (PST)

Alert Box for CMS

Hi, all! I have a problem I’m trying to navigate. I work for a non-profit and one of the services we provide is websites for schools. I’m pretty happy with how our sites have turned out. You can see a few examples here:

One of the requests I have from schools is to add an alert box at the top of a site so that schools can post during emergency situations. School closings, weather alerts, etc.

I know I can do this with some custom code and the CMS. If I use the : empty selector I can make it to where the bar doesn’t show when they go in and erase the text and publish. This will work, but it seems a bit convoluted.

Anyone have any ideas?

OOOOOO! I know i know! raises hands

I did this exact thing on Give me a sec to write it up

1 Like

Ahhh, yes!!! I love this forum! I’m glad you’re here, @PixelGeek!! You’re so helpful! I greatly appreciate it!


enjoy! :smiley:



That. Is. Brilliant!! Thank you so much! Could you share the read-only link so I can explore the ins and outs on some of your settings?

This is going to solve the issue for me!

You rule! Last question…will you paste your cookie code as well? I want to crawl through it! If not, no worries!

$.getScript('', function() {
  var cookieName = 'isModalClosed';
  var cookieDate = $('#cookieDate').text();
  if(typeof Cookies.get(cookieName) !== 'undefined') $('.emergency-modal').remove();
  $('#closeModal').click(function() {
    Cookies.set(cookieName, cookieDate, { expires: 1 });
1 Like

Thank you! I appreciate all the time and help!

1 Like

This topic was automatically closed 125 days after the last reply. New replies are no longer allowed.