Commit ba8949cb authored by Yohan Jarosz's avatar Yohan Jarosz

add a case for the index url

parent 6163e20a
......@@ -13,12 +13,15 @@
{% endif %}
<ul class="nav navbar-nav">
{% if page.nav %}
{% capture indexurl %}/web/{{brand[0]}}/{% endcapture %}
{% assign navs = page.nav | split:"," %}
{% for nav in navs %}
{% assign link = nav | split:"$" %}
{% assign myurl = link[0] %}
{% if myurl contains '://' %}
<li class="{% if page.url contains myurl %}active{% endif %}"><a href="{{myurl}}">{{link[1]}}</a></li>
{% elsif myurl == 'index' and page.url == indexurl %}
<li class="active"><a href="{{myurl}}.html">{{link[1]}}</a></li>
{% else %}
<li class="{% if page.url contains myurl %}active{% endif %}"><a href="{{myurl}}.html">{{link[1]}}</a></li>
{% endif %}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment