We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent bcbf853 commit 70b6eafCopy full SHA for 70b6eaf
docs/_includes/primary-navigation.html
@@ -3,9 +3,13 @@
3
<ul class="nhsuk-header__navigation-list">
4
5
{% for p in site.data.primary-navigation -%}
6
+ {% assign is_current = false %}
7
+ {% if page.url == p.link or page.url contains p.link and p.link != '/' %}
8
+ {% assign is_current = true %}
9
+ {% endif %}
10
<li class="nhsuk-header__navigation-item">
- <a class="nhsuk-header__navigation-link" href="{{ site.baseurl | append: p.link | xml_escape }}">{{ p.title
- }}</a>
11
+ <a class="nhsuk-header__navigation-link" href="{{ site.baseurl | append: p.link | xml_escape }}" {% if
12
+ is_current %} aria-current="page" {% endif %}>{{ p.title }}</a>
13
</li>
14
{% endfor -%}
15
0 commit comments