Commit 0e36a5c5 authored by Laura Kalbag's avatar Laura Kalbag

Refine navigation active class code

parent 6d2bbf40
......@@ -5,7 +5,7 @@
{{ if .Site.Menus.main }}
<ul>
{{ range .Site.Menus.main -}}
<li {{if $currentPage.IsMenuCurrent "main" . }} class="active"{{end}}>
<li {{if or ($currentPage.IsMenuCurrent "main" .) ($currentPage.HasMenuCurrent "main" .) }} class= "active"{{ end }}>
<a href="{{ .URL }}">
{{- .Name -}}
</a>
......@@ -14,4 +14,4 @@
</ul>
{{- end }}
</div>
</nav>
</nav>
\ No newline at end of file
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