Skip to content
Snippets Groups Projects
Unverified Commit 484563b2 authored by Patrick Marsceill's avatar Patrick Marsceill Committed by GitHub
Browse files

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

Fix duplicate entries in nav.html and default.html
parents 561f930e e97b718f
No related branches found
No related tags found
No related merge requests found
...@@ -29,7 +29,7 @@ ...@@ -29,7 +29,7 @@
{%- endif -%} {%- endif -%}
<a href="{{ child.url | absolute_url }}" class="navigation-list-link{% if page.url == child.url %} active{% endif %}">{{ child.title }}</a> <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 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"> <ul class="navigation-list-child-list">
{%- for grand_child in grand_children_list -%} {%- for grand_child in grand_children_list -%}
<li class="navigation-list-item {% if page.url == grand_child.url %} active{% endif %}"> <li class="navigation-list-item {% if page.url == grand_child.url %} active{% endif %}">
......
...@@ -83,8 +83,9 @@ layout: table_wrappers ...@@ -83,8 +83,9 @@ layout: table_wrappers
<hr> <hr>
<h2 class="text-delta">Table of contents</h2> <h2 class="text-delta">Table of contents</h2>
<ul> <ul>
{% for child in pages_list %} {%- assign children_list = pages_list | where: "parent", node.title -%}
{% if child.parent == page.title and child.title != page.title %} {% for child in children_list %}
{% if child.parent == page.title and child.title != page.title and child.grand_parent == page.parent %}
<li> <li>
<a href="{{ child.url | absolute_url }}">{{ child.title }}</a>{% if child.summary %} - {{ child.summary }}{% endif %} <a href="{{ child.url | absolute_url }}">{{ child.title }}</a>{% if child.summary %} - {{ child.summary }}{% endif %}
</li> </li>
......
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