Skip to content

Latest commit

 

History

History
92 lines (66 loc) · 2.28 KB

File metadata and controls

92 lines (66 loc) · 2.28 KB

Footer

Wagtail Site Settings

wagtail-nhs-style comes with a wagtail site settings model. If you want to allow CMS users to configure the footer in the wagtail interface, use of the site setting is recommended.

Add the wagtailnhsukfrontend.settings module to your INSTALLED_APPS config.

INSTALLED_APPS = [
  ...
  'wagtailnhsukfrontend',
  'wagtailnhsukfrontend.settings',
  ...
]

This will create a new option under Settings > Footer settings in the wagtail interface.

To include the footer in your template, use the header templatetag.

{% load nhsukfrontendsettings_tags %}

...

<body>
  ...
  {% footer %}
</body>

The NHS.UK footer component can be configured in two styles:


Column-based Footer

The column-based footer allows content to be organised into up to 4 columns. Each column can contain multiple links to either internal Wagtail pages or external URLs.

Enabling Column-based Footer

  1. In Wagtail Admin, navigate to Settings > Footer Column Settings
  2. Tick "Enable column-based footer"
  3. Add footer links using the "Footer Column Links" panel
  4. For each link:
    • Select the column number (1–4)
    • Enter the link label
    • Choose either:
      • An internal page using "Link page"
      • An external URL using "Link URL"

Template Usage

{% include 'wagtailnhsukfrontend/footer.html' %}

The template automatically detects which footer style to use based on your settings.

Standard Footer

The standard footer provides a single column of links and can be configured through Settings > Footer Settings.

Configuration

  1. In Wagtail Admin, navigate to Settings > Footer Settings
  2. Add footer links using the "Footer Links" panel
  3. For each link:
  • Enter the URL
  • Enter the link label

Template Usage

{% include 'wagtailnhsukfrontend/footer.html' %}

Customisation

Both footer styles include:

  • NHS copyright notice
  • Semantic HTML with proper ARIA roles
  • Responsive design following NHS.UK frontend standards

Reference