nhsuk / wagtail-nhsuk-frontend

A wagtail implementation of the NHS.UK frontend library
MIT License
21 stars 13 forks source link

Header component - navigation items #107

Closed chrimesdev closed 5 years ago

chrimesdev commented 5 years ago

When adding navigation items through the Settings -> Header tab, I can only add pages (via the page selector) that are on Wagtail. Some of the pages in our main navigation aren't on Wagtail (service search).

How can I add external links to the navigation?

chrimesdev commented 5 years ago

This is NHS website specific issue and should be fixed on there, rather than here.

mikemonteith commented 5 years ago

The header template can be used without having to use the HeaderSettings site setting.

You could implement your own setting for the header and then use the header template include directly, (making sure you pass the correct template variables as documented here https://github.com/nhsuk/wagtail-nhsuk-frontend/blob/master/docs/components/header.md#direct-use-of-templates

You could maybe subclass the HeaderSettings and NavigationLink models? disclaimer: I haven't tried this out.