Banners
Two banners are yours to set: a message across the top of every page, and a site usage (cookie) banner at the bottom of every page outside the admin area. The admin area also shows a few status banners of its own.
What it is
| Banner | Shows | Set on |
|---|---|---|
| Global message | At the top of every page: public, member and admin. Not on an app's full-screen pages. | Admin, Settings, Global Messages (/admin/settings/message) |
| Site usage | At the bottom of every page except admin pages, until the visitor accepts or rejects. On an app's full-screen page it waits for the next normal page. | Admin, Settings, Site Usage (/admin/settings/site-usage) |
| Email not configured | On the admin dashboard and, with the Signup forms feature on, the Signup Forms page, while email is off | Shown by itself (see Use it) |
| Debug Provider active | On the admin dashboard, while the Debug Provider is the email provider | Shown by itself |
An app marks a page full-screen with data: { fullScreen: true } on its route, for a game or a kiosk screen (Add pages and routes).
Announcements are something else: with the Email marketing feature on, under Admin, Email, Announcements, an admin sends a message to chosen users as an in-app notification, and optionally by email. See Email marketing and Notifications.
Turn it on or off
Banners are always on: they are core, not a switchable feature. Each of your two banners is turned on with Enable Banner on its settings page and off with the Banner Enabled switch; both start switched off.
Set it up
Global message
Open Admin, Settings, Global Messages and click Enable Banner.
Write a heading and a message (both required).
Optionally add a button label and URL. The button shows only when both are filled in, and opens the URL in a new tab.
Pick a background style: Info Blue, Warning Amber, Success Green, Urgent Red, Ocean Blue or Ocean Teal. Check the preview, and click Save Settings.
Site usage
Open Admin, Settings, Site Usage and click Enable Banner.
Edit the message and the accept and reject button texts, or keep the defaults. A button text left empty shows Arc CMS's own wording, "Accept All" or "Reject All", in the visitor's language, as does the "Learn more" link; the message is always yours.
Set the policy link. While it is the default,
/p/cookie-policy, the banner links to the published Cookie Policy standard page (/info/cookie-policy, see Standard pages) once there is one, so publishing that page is all it takes. Until then the default opens the built-in page frompublic/_site/pages/cookie-policy.html, a sample that names Arc CMS andsupport@example.com. A link you set yourself is always kept.Pick a background style and click Save Settings.
Use it
Both banners update in open browsers as soon as you save: nobody has to reload.
- The global message stays until you turn it off. Visitors cannot close it.
- The site usage banner disappears for a visitor once they click accept or reject. The choice is kept in that browser only (local storage, key
arc_site_usage), so they see it again in another browser or after clearing site data. An app can ask again withreopen()onSiteUsageService, for a "Cookie settings" link. - The email not configured banner shows while the email master switch is off (see Email engine). An admin can close it in that browser tab; it shows again in a new tab until email is turned on.
- The Debug Provider banner stays while the Debug Provider is active, so a test setup is never taken for a live one.
Whether the visitor's choice decides tracking is an install setting. With analyticsConsent always (the default) Google Analytics runs whatever they choose; with required it runs only after they accept, and turning this banner off then means nobody is tracked. See Analytics.
Both banners are drawn in the browser, not in the server-rendered HTML, so search engines and link previews do not see their text.
Extend it
The banners have no plug points. For a banner of your own (only in the member area, say, or with a dismiss button), build a component in the custom space (see Use the custom space) rather than changing these.
What it stores
| Where | Holds |
|---|---|
Settings/global-message | isEnabled, heading, message, buttonLabel, buttonLink, gradientId |
Settings/site-usage | isEnabled, bannerText, acceptButtonText, rejectButtonText, privacyPolicyLink, gradientId |
Settings/email_status | What the two status banners read: isEnabled and debugMode |
| Visitor's browser | arc_site_usage (local storage): accepted or rejected; email_banner_dismissed (session storage) for an admin who closed the email banner |
No Cloud Functions and nothing in Storage. See Data model.
Who can do what
| Who | Can |
|---|---|
| Anyone, signed in or not | Read Settings/global-message, Settings/site-usage and Settings/email_status (the banners need them before sign-in) |
| Admin | Write them |
Troubleshooting
| You see | Why, and what to do |
|---|---|
| The site usage banner does not show for you | You already accepted or rejected in this browser, or you are on an admin page. Remove arc_site_usage from the site's local storage, or open a private window. |
| The global message has no button | The button needs both a label and a URL. |
| The email not configured banner keeps coming back | Email is off. Set up a provider and turn the master switch on (see Email engine). |