Merge pull request #239 from KasparEtter/fix-duplicates-in-nav

Fix duplicate entries in nav.html and default.html
This commit is contained in:
Patrick Marsceill
2020-04-28 17:52:35 -04:00
committed by GitHub
2 changed files with 4 additions and 3 deletions

View File

@@ -29,7 +29,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 -%}
{%- assign grand_children_list = pages_list | where: "parent", child.title -%}
{%- assign grand_children_list = pages_list | where: "parent", child.title | where: "grand_parent", node.title -%}
<ul class="navigation-list-child-list">
{%- for grand_child in grand_children_list -%}
<li class="navigation-list-item {% if page.url == grand_child.url %} active{% endif %}">