Deploy a banner to certain pages
This documentation should be used when we receive a request to publish a banner to a single, or group of pages. If you want to publish a sitewide banner then reference deploy emergency banner or deploy non-emergency banner.
We can publish a few different banner types, depending on the ask. For example, we’ve previously published a notice banner for a mini-reshuffle and an intervention banner for a research panel.
The component guide has a list of GOV.UK components which includes banners like notice and intervention and their variants, e.g notice with markup in title.
Prerequisites
banner text
banner location on page/s
Steps
- Find the rendering app of the chosen pages (visit
https://gov.uk/api/content/<base-path>
and look forrendering_app
) - Create a branch introducing the component in the relevant view and with a helper method that only displays the banner for certain base_paths (e.g org pages in Collections).
- Preview the banner locally (e.g using docker collections-app-live, or deploy a branch to integration)
- Check the positioning of the banner and adjust accordingly. See an example of adjusting the margin of the notice banner.
Once your changes are merged, you should also write a technical debt card for the banner you’ve added, as this is a non-standard piece of technical work that has been essentially ‘hacked in’ due to limitations in our current platform.