forked from tsc-vfl/hugo-page
17 lines
579 B
HTML
17 lines
579 B
HTML
|
{{ $currentPage := .Page }}
|
||
|
{{ range .Site.Menus.main }}
|
||
|
{{ if or ($currentPage.IsMenuCurrent "main" .) ($currentPage.HasMenuCurrent "main" .) }}
|
||
|
{{ if .HasChildren }}
|
||
|
{{ range .Children }}
|
||
|
{{ $submenu := "" }}
|
||
|
{{ if $currentPage.IsMenuCurrent "main" . }}
|
||
|
{{ $submenu = " active"}}
|
||
|
{{ end }}
|
||
|
<a href="{{ .URL }}" class="{{ $submenu }}">
|
||
|
{{ print .Name | safeHTML }}
|
||
|
</a>
|
||
|
{{ end }}
|
||
|
{{ end }}
|
||
|
{{ end }}
|
||
|
{{ end }}
|