Skip to content

Commit

Permalink
link html
Browse files Browse the repository at this point in the history
  • Loading branch information
patrickpatrickpatrick committed Dec 6, 2024
1 parent be78ae2 commit 8e7365a
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion views/partials/_navigation.njk
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,18 @@
{% set navigationItems = navigationItems.concat({
href: item.href,
text: item.text,
current: permalink and permalink.startsWith(item.url)
active: permalink and permalink.startsWith(item.url),
current: permalink === item.url
}) %}
{% if permalink and permalink.startsWith(item.url) %}
{% for subItem in item.items %}
{% set navigationItems = navigationItems.concat({
text: subItem.label,
current: permalink === subItem.url,
html: '<a class="app-subnav__link app-subnav__link--mobile-only govuk-link govuk-link--no-visited-state govuk-link--no-underline" href="' + subItem.url + '">' + subItem.label + '</a>'
}) %}
{% endfor %}
{% endif %}
{% endfor %}

{{ govukServiceNavigation({
Expand Down

0 comments on commit 8e7365a

Please sign in to comment.