forked from data.coop/website
Highlighting of current page stopped working, something with new URLS, this fix fixes it, but I don't know if it is the correct way to accomplish it.
This commit is contained in:
parent
f65718db01
commit
7b4e3ac695
|
@ -2,7 +2,9 @@
|
||||||
<ol>
|
<ol>
|
||||||
{{ $currentPage := . }}
|
{{ $currentPage := . }}
|
||||||
{{ range .Site.Menus.nav }}
|
{{ range .Site.Menus.nav }}
|
||||||
<li><a href="{{ .URL }}"{{ if (eq $currentPage.URL .URL) }} class="active"{{ end }}>{{ .Name }}</a></li>
|
{{ $atURL := absURL $currentPage.URL }}
|
||||||
|
{{ $compURL := absURL .URL }}
|
||||||
|
<li><a href="{{ .URL }}"{{ if (eq $atURL $compURL) }} class="active"{{ end }}>{{ .Name }}</a></li>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
</ol>
|
</ol>
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue