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">
|
<div id="nav-border" class="container nav">
|
||||||
<nav id="nav" class="nav justify-content-center">
|
<nav id="nav" class="nav justify-content-center">
|
||||||
{{ range .Site.Menus.main }}
|
{{ 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 }}
|
{{/*{{ if .Pre }}
|
||||||
{{ $icon := printf "<i data-feather=\"%s\"></i> " .Pre | safeHTML }}
|
{{ $icon := printf "<i data-feather=\"%s\"></i> " .Pre | safeHTML }}
|
||||||
{{ $icon }}
|
{{ $icon }}
|
||||||
|
@ -1,6 +1,10 @@
|
|||||||
{{ $currentPage := .Page }}
|
{{ $currentPage := .Page }}
|
||||||
{{ range .Site.Menus.main }}
|
{{ 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 }}
|
{{ if .HasChildren }}
|
||||||
{{ range .Children }}
|
{{ range .Children }}
|
||||||
{{ $submenu := "" }}
|
{{ $submenu := "" }}
|
||||||
|
Loading…
Reference in New Issue
Block a user