Adding a banner message to PowerPAC

A question came up in the IUG Discord about adding a message to the PowerPAC, something that patrons would see when they accessed the website. A message like this might be used for important announcements like branch closures, event cancellations, emergency information, and so on.

The easiest way to do this is to add some HTML to the site.master file for the PowerPAC. Now, depending on your setup, you’ll find that file either in the PowerPAC directory itself or, if you’ve done some custom theming, it may be in PowerPAC\custom\themes or somewhere like that. Look for a line that says:

 <!--- MAIN CONTENT - START --> It'll be around line 230 as of Polaris 7.7.

Under that you’ll find a code block like what you see below, look for the form tag. I’ve added an example message in the code block, but you can style it as you like.

<form id="formMain" method="post" runat="server" onsubmit="<%# GetOnSubmitHandler() %>" onclick="<%# GetOnClickHandler() %>">
<!-- BEGIN SITE WIDE MESSAGE -->
<div style="background-color: #ffefc6; padding: 10px; border: 1px solid #e0b000; text-align: center;">
This is an important site-wide message that you should know about!
</div>
<!-- END SITE WIDE MESSAGE -->
<asp:ContentPlaceHolder id="BodyMainContent" runat="server">        
</asp:ContentPlaceHolder>
</form>

You’ll get something that looks like this on your PowerPAC.

And this is a message that persists throughout a good portion of the PowerPAC, so you’ll see it in other locations like account login.

Since you’re dropping plain HTML into that site.master file, you can do anything you normally do with HTML, including adding CSS styling, images, and so on. Additionally, this change does not require reloading the PAC or an IIS reset. Once you make your changes and save the file, your message is live on the website.

As always, make sure you keep a backup copy of your original site.master file just in case something goes wrong. You can always roll back to a known good and start over.

2 Likes