Skip to content

Commit

Permalink
Side navigation: Only shown nested list if page has children
Browse files Browse the repository at this point in the history
  • Loading branch information
paulrobertlloyd committed Mar 5, 2022
1 parent cd8b2ea commit bdcc257
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion x-govuk/components/side-navigation/template.njk
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
{% for item in items %}
<li class="x-govuk-side-navigation__section-item{% if item.parent %} x-govuk-side-navigation__section-item--current{% endif %}">
<a class="x-govuk-side-navigation__link" href="{{ item.href }}"{% if item.current %} aria-current="true"{% endif %}>{{ item.text }}</a>
{% if item.children and item.parent %}
{% if item.parent and item.children | length > 0 %}
<ul class="x-govuk-side-navigation__section x-govuk-side-navigation__section--nested">
{% for child in item.children %}
<li class="x-govuk-side-navigation__section-item">
Expand Down

0 comments on commit bdcc257

Please sign in to comment.