Alert Block

~katie~'s Avatar

~katie~

09 Feb, 2015 11:10 PM

Hi,

I'm wanting to create an alert that is on the top of every page in the event of an emergency. The alert could be turned off or on. What is the best way to do this?

I assumed this could be a block that used a data definition to set the alert text (textbox) and activate or deactivate the alert (radiobuttons), but not sure what kind of block and what to do from there.

  1. 1 Posted by Wing Ming Chan on 10 Feb, 2015 01:12 PM

    Wing Ming Chan's Avatar

    Hi Katie,

    Before answering your question, I would like to clarify two things first.

    1. When you said "every page", how many pages were you talking about? Do you plan to republish all the pages when needed?

    2. What language do you use on the server side, after pages have been published?

    I built an announcement system more than a year ago. Here is some brief information:

    1. In the templates we have, I insert a line of PHP code for this purpose, so that every page already has this line of code. The code basically checks if two files exist (one for public, one for intranet), and if they do, displays the content of the files accordingly.

    2. A site was built with two simple pages (hooked up with two data definition blocks) that can be published and unpublished. When these two pages are published, the PHP code embedded in step one will be executed. If they don't exist, then no messages will be displayed.

    3. A web service script is used to hook up two web pages served by the server to send commands and messages into Cascade, and publishes/unpublishes the two Cascade pages. Users of these web pages don't have to know anything about Cascade.

    In this setup, there is no page publishing other than using the two web pages to publish/unpublish the two Cascade pages. If you are interested, see Announcements for more details.

    Wing

  2. 2 Posted by ~katie~ on 10 Feb, 2015 03:48 PM

    ~katie~'s Avatar

    Every page is just that, every single page on the website. That is part of the reason why I thought using a block would be more efficient. I'm not sure how publishing works in the grand scheme because we haven't got to that point. I assumed when you changed a block and published that item that every page that used that block would be updated.

    We do not have a server side language setup yet, but it is most likely coldfusion.

  3. 3 Posted by Wing Ming Chan on 10 Feb, 2015 04:00 PM

    Wing Ming Chan's Avatar

    I asked about the number of pages precisely because, if you attach the block to every page, you need to republish every one of them when the block is updated. This can take, for us at Upstate, days to finish, and hence extremely undesirable. With PHP code already embedded, no pages need to be republished, and that's the whole point.

    Wing

  4. 4 Posted by ~katie~ on 10 Feb, 2015 04:05 PM

    ~katie~'s Avatar

    Can anyone else confirm that you have to republish every single page that uses a block? What if you apply the block at the template level? If you make no changes to the structure and only to the content of the block, do you have to republish every asset that uses that block?

  5. Support Staff 5 Posted by Tim on 10 Feb, 2015 04:19 PM

    Tim's Avatar

    Hi Katie,

    Yes, Wing is correct. Any time a Block's content changes, you'll need to re-publish any Pages that use the Block in question.

  6. 6 Posted by ~katie~ on 10 Feb, 2015 05:42 PM

    ~katie~'s Avatar

    Thank you Tim and Wing.

  7. ~katie~ closed this discussion on 10 Feb, 2015 05:42 PM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac