Skip to content
Snippets Groups Projects
Commit 209ac7be authored by Peter Mosses's avatar Peter Mosses
Browse files

Update nav.html

Restrict navigation to display only direct children.
parent 89f79138
No related branches found
No related tags found
No related merge requests found
......@@ -20,6 +20,7 @@
{%- endif -%}
<a href="{{ child.url | absolute_url }}" class="navigation-list-link{% if page.url == child.url %} active{% endif %}">{{ child.title }}</a>
{%- if child.has_children -%}
{%- if page.url == child.url or page.parent == child.title -%}
{%- assign grand_children_list = site.html_pages | where: "parent", child.title | sort:"nav_order" -%}
<ul class="navigation-list-child-list">
{%- for grand_child in grand_children_list -%}
......@@ -29,6 +30,7 @@
{%- endfor -%}
</ul>
{%- endif -%}
{%- endif -%}
</li>
{%- endfor -%}
</ul>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment