hugo-page-test/themes/tsc_vfl/layouts/partials/page/left_menu.html

21 lines
715 B
HTML

{{ $currentPage := .Page }}
{{ range .Site.Menus.main }}
{{ if or
($currentPage.IsMenuCurrent "main" .)
($currentPage.HasMenuCurrent "main" .)
(and (eq $currentPage.Type "news") (eq .Identifier "aktuell") )
}}
{{ if .HasChildren }}
{{ range .Children }}
{{ $submenu := "" }}
{{ if or ($currentPage.IsMenuCurrent "main" .) ($currentPage.HasMenuCurrent "main" .) }}
{{ $submenu = " active"}}
{{ end }}
<a href="{{ .URL }}" class="{{ $submenu }}">
{{ print .Name | safeHTML }}
</a>
{{ end }}
{{ end }}
{{ end }}
{{ end }}