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

22 lines
797 B
HTML
Raw Permalink Normal View History

2023-01-19 17:21:20 +00:00
{{ $currentPage := .Page }}
{{ range .Site.Menus.main }}
2024-01-04 14:57:23 +00:00
{{ if or
($currentPage.IsMenuCurrent "main" .)
($currentPage.HasMenuCurrent "main" .)
(and (eq $currentPage.Type "news") (eq .Identifier "aktuell") )
2024-01-14 08:47:56 +00:00
(and (eq $currentPage.Type "turniermeldung") (eq .Identifier "aktuell") )
2024-01-04 14:57:23 +00:00
}}
2023-01-19 17:21:20 +00:00
{{ if .HasChildren }}
{{ range .Children }}
{{ $submenu := "" }}
2023-01-21 17:07:36 +00:00
{{ if or ($currentPage.IsMenuCurrent "main" .) ($currentPage.HasMenuCurrent "main" .) }}
2023-01-19 17:21:20 +00:00
{{ $submenu = " active"}}
{{ end }}
<a href="{{ .URL }}" class="{{ $submenu }}">
{{ print .Name | safeHTML }}
</a>
{{ end }}
{{ end }}
{{ end }}
{{ end }}