forked from tsc-vfl/hugo-page
Show correct side menu in news entries
This commit is contained in:
parent
a0cf3bef07
commit
28e9d32e2c
@ -27,7 +27,11 @@
|
||||
<div id="nav-border" class="container nav">
|
||||
<nav id="nav" class="nav justify-content-center">
|
||||
{{ range .Site.Menus.main }}
|
||||
<a class="nav-link{{ if or ($.Page.IsMenuCurrent "main" .) ($.Page.HasMenuCurrent "main" .) }} active{{ end }}" href="{{ .URL }}">
|
||||
<a class="nav-link{{ if or
|
||||
($.Page.IsMenuCurrent "main" .)
|
||||
($.Page.HasMenuCurrent "main" .)
|
||||
(and (eq $.Page.Type "news") (eq .Identifier "aktuell"))
|
||||
}} active{{ end }}" href="{{ .URL }}">
|
||||
{{/*{{ if .Pre }}
|
||||
{{ $icon := printf "<i data-feather=\"%s\"></i> " .Pre | safeHTML }}
|
||||
{{ $icon }}
|
||||
|
@ -1,6 +1,10 @@
|
||||
{{ $currentPage := .Page }}
|
||||
{{ range .Site.Menus.main }}
|
||||
{{ if or ($currentPage.IsMenuCurrent "main" .) ($currentPage.HasMenuCurrent "main" .) }}
|
||||
{{ if or
|
||||
($currentPage.IsMenuCurrent "main" .)
|
||||
($currentPage.HasMenuCurrent "main" .)
|
||||
(and (eq $currentPage.Type "news") (eq .Identifier "aktuell") )
|
||||
}}
|
||||
{{ if .HasChildren }}
|
||||
{{ range .Children }}
|
||||
{{ $submenu := "" }}
|
||||
|
Loading…
Reference in New Issue
Block a user