Settings for Site Message and Site Alert
Sometimes you may need to communicate with your website visitors in a different way than through your regular content. When you have important information, you can use the site alert and site message features. These are two types of static messages that appear at the top of the website.
Site alert
With site alerts, you can use different types of status messages depending on the type of information you want to convey. A site alert is used to display short, simple messages of up to 128 characters.
Three types of site alert messages in Drupal
When you activate a site alert, you can choose between three different types of site alert messages: general information (primary), warning, and error. The message appears at the top of your website in the form of a text banner with either a brown, yellow, or red background colour.
General information (Primary)
Example: Used to provide general information.
Example: Something you want to bring to your users' attention. Usually something visitors must do or know in order to proceed.
Example: Inform visitors about serious errors on the website.
Create site alert message
- In the administration menu, select Settings > Site alert & message. Go to the Site alert tab.
- Toggle site alerts: Here you can choose whether you want the message to be displayed or not.
- Alert type: Select the type of message you want to create (General information, warning or error).
- Site alert message: Here you can write the text that will be displayed to visitors.
- Click the "Save configuration" button to save your message.
- Turn off site alert message
- To turn off the notification, go back to "Site alert & message" and uncheck "Toggle site alerts" from On to Off.
Site message
A site message consists of a heading and body text that appears at the top of the website's main content. In addition to this, site messages also have their own heading that you can fill in yourself. It will be centred in the grey field and the text with information will be in the yellow field. Site messages can contain longer text than site alerts, and it is also possible to add links and other types of formatting.
Create site message
- In the administration menu, select "Settings" and click on "Site alert & message". Go to the "Site message" tab.
- Toggle site message: Here you can choose whether you want the message to be displayed or not.
- Message title: Write the title of your message here.
- Message body: Here you write the text that will be displayed to the visitor, and do any formatting.
- Click the "Save configuration" button to save your message.
- Turn off site message
- To turn off the message, go back into "Site alert & message" and uncheck "Toggle site message" from On to Off.