Hello,

Is there a way i can set up a side-wide notice, such as if i wanted to let my users know that there will be a schedule site maintenance? I'd ideally want something like a CSS block on every page.

Thanks.

Comments

nevets’s picture

You can add a block with the notice and place in a region that shows on all pages.

nirbhasa’s picture

1. If you have the rules module installed, you can configure it to display a site maintenance message every time a page is viewed. Sometimes you just want the site closed for editing, in that case you can limit the message to authenticated users.

2. Otherwise, in the page.tpl.php of your file just below where it says

print $messages

you can put

<div class="message">This site is down for maintenance</div>

Be sure to remove it when the maintenace is over :)

khaji00’s picture

I ended up using the page.tpl.php solution.

I styled it using embedded CSS with code that i found from this guide: http://www.bioneural.net/2006/04/01/create-a-valid-css-alert-message/ .

I also moved the message php string above the page title. I hope others find this helpful.

          <?php if ($show_messages && $messages): print $messages; endif; ?>
<style  TYPE="text/css">
.message {
	background: #fff6bf url(../images/Alert.png) center no-repeat;
	background-position: 15px 50%; /* x-pos y-pos */
	text-align: left;
	padding: 5px 20px 5px 60px;
	border-top: 2px solid #ffd324;
	border-bottom: 2px solid #ffd324;
	}
</style>

<div class="message">This site will be unavailable on Month Day, Year for site maintenance</div>

Thanks for your help, works just as i had imagined. Here is a preview: http://i5.photobucket.com/albums/y158/khaji00/css_alert.gif