Customers now have the ability to inject their own custom global banner that will be shown at the top of all pages for all users of the application, whether logged in or not. This allows government users to add “An agency of xxxx” to all pages on their domain (see example above). See local regulations to determine whether or not this is legally required in your jurisdiction.
How it works:
The feature is accessed via Site Appearance → Header tab. The new input is called Global Header Banner HTML and will accept HTML, CSS and Script tags. Any input in this control is implicitly trusted as safe and will be injected into a specific "<section>" element in the header for all pages.
<div id="custom-global-banner">
<%= custom_banner_content %>
<div id="custom-banner-anchor"></div>
</div>
It is imperative that the content is placed here as all css formatting for the banner is based around this element. Any input that is entered into the Global Header Banner HTML control will be placed inside this container. In the case of raw html and css, no further steps are necessary. The banner should display as desired (see below for the Mass banner example). In instances where the customer wants to inject a banner that is generated from a javascript file, additional steps may be necessary (see the Virginia banner example below). Any input entered for the custom banner is validated to ensure it is valid HTML.
Special Considerations
Javascript or raw HTML? | Example | Notes |
Javascript ExampleInjecting a banner via javascript for the State of Virginia) |
Ex. The state of Virginia has developed their own javascript file that will generate and inject their banner into a web page. By default it will look for the MUST be placed inside the https://www.developer.virginia.gov/downloads/commonwealth-banner/ |
|
Raw HTML ExampleInjecting a banner with raw HTML for the State of Customer |
Ex. A customer has created a custom banner which is raw HTML. We have templetized it to provide an example. Inputting HTML into Site Appearance is simple and straight forward. A user should copy their code directly into the “Global Header Banner HTML” field highlighted above. (Note: the example code is for demonstration purposes only and will not work on a live customer domain) |
<div class="{your agency}__header_slim">
|
FAQ
There are a small number of areas on the platform where the banner doesn't show up. These areas are pages where configurations is the focus of the page. Examples: Visualization Canvas editor, Measure configuration, and various portions of the import tool.
The pages where the Custom Global Banner works are specifically focused on Open and Enterprise Data domains and will not show up in applications.
Comments
Article is closed for comments.