Menu: work with sub-pages
This commit is contained in:
parent
63d25e43e7
commit
bfde3425a4
1 changed files with 2 additions and 2 deletions
|
@ -1,7 +1,7 @@
|
||||||
<ul>
|
<ul class="navmenu">
|
||||||
{{ $currentPage := . }}
|
{{ $currentPage := . }}
|
||||||
{{ range .Site.Menus.main }}
|
{{ range .Site.Menus.main }}
|
||||||
<li class="{{ if $currentPage.IsMenuCurrent "main" . }}active{{ end }}">
|
<li class="{{ if or ($currentPage.IsMenuCurrent "main" .) ($currentPage.HasMenuCurrent "main" .) }}active{{ end }}">
|
||||||
<a href="{{ .URL }}">
|
<a href="{{ .URL }}">
|
||||||
{{ .Pre }}
|
{{ .Pre }}
|
||||||
<span>{{ .Name }}</span>
|
<span>{{ .Name }}</span>
|
||||||
|
|
Loading…
Reference in a new issue