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

Merge pull request #282 from blawqchain/patch-1

Update nav.html for handling nav_exclude
parents 06809350 6f2065aa
No related branches found
No related tags found
No related merge requests found
...@@ -13,22 +13,26 @@ ...@@ -13,22 +13,26 @@
{%- assign children_list = site.html_pages | where: "parent", node.title | sort:"nav_order" -%} {%- assign children_list = site.html_pages | where: "parent", node.title | sort:"nav_order" -%}
<ul class="navigation-list-child-list "> <ul class="navigation-list-child-list ">
{%- for child in children_list -%} {%- for child in children_list -%}
<li class="navigation-list-item {% if page.url == child.url or page.parent == child.title %} active{% endif %}"> {%- unless child.nav_exclude -%}
{%- if page.url == child.url or page.parent == child.title -%} <li class="navigation-list-item {% if page.url == child.url or page.parent == child.title %} active{% endif %}">
{%- assign second_level_url = child.url | absolute_url -%} {%- if page.url == child.url or page.parent == child.title -%}
{%- endif -%} {%- assign second_level_url = child.url | absolute_url -%}
<a href="{{ child.url | absolute_url }}" class="navigation-list-link{% if page.url == child.url %} active{% endif %}">{{ child.title }}</a> {%- endif -%}
{%- if child.has_children -%} <a href="{{ child.url | absolute_url }}" class="navigation-list-link{% if page.url == child.url %} active{% endif %}">{{ child.title }}</a>
{%- assign grand_children_list = site.html_pages | where: "parent", child.title | sort:"nav_order" -%} {%- if child.has_children -%}
<ul class="navigation-list-child-list"> {%- assign grand_children_list = site.html_pages | where: "parent", child.title | sort:"nav_order" -%}
{%- for grand_child in grand_children_list -%} <ul class="navigation-list-child-list">
<li class="navigation-list-item {% if page.url == grand_child.url %} active{% endif %}"> {%- for grand_child in grand_children_list -%}
<a href="{{ grand_child.url | absolute_url }}" class="navigation-list-link{% if page.url == grand_child.url %} active{% endif %}">{{ grand_child.title }}</a> {%- unless grand_child.nav_exclude -%}
</li> <li class="navigation-list-item {% if page.url == grand_child.url %} active{% endif %}">
{%- endfor -%} <a href="{{ grand_child.url | absolute_url }}" class="navigation-list-link{% if page.url == grand_child.url %} active{% endif %}">{{ grand_child.title }}</a>
</ul> </li>
{%- endif -%} {%- endunless -%}
</li> {%- endfor -%}
</ul>
{%- endif -%}
</li>
{%- endunless -%}
{%- endfor -%} {%- endfor -%}
</ul> </ul>
{%- endif -%} {%- endif -%}
......
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