diff --git a/layouts/partials/footer.html b/layouts/partials/footer.html index 1d7567368c..5a3c2710a8 100644 --- a/layouts/partials/footer.html +++ b/layouts/partials/footer.html @@ -26,29 +26,29 @@ {{end}} {{ $currentNode.Scratch.Set "prevPageTmp" .menu }} - {{ $currentNode.Scratch.Set "pages" .menu.Pages }} - {{ if .menu.IsHome}} - {{ $currentNode.Scratch.Set "pages" .menu.Sections }} - {{ else if .menu.Sections}} - {{ $currentNode.Scratch.Set "pages" (.menu.Pages | union .menu.Sections) }} - {{end}} - {{ $pages := ($currentNode.Scratch.Get "pages") }} + {{ $currentNode.Scratch.Set "pages" .menu.Pages }} + {{ if .menu.IsHome}} + {{ $currentNode.Scratch.Set "pages" .menu.Sections }} + {{ else if .menu.Sections}} + {{ $currentNode.Scratch.Set "pages" (.menu.Pages | union .menu.Sections) }} + {{end}} + {{ $pages := ($currentNode.Scratch.Get "pages") }} - {{ range $pages.ByWeight }} - {{ template "menu-nextprev" dict "menu" . "currentnode" $currentNode }} - {{end}} + {{ range $pages.ByWeight }} + {{ template "menu-nextprev" dict "menu" . "currentnode" $currentNode }} + {{end}} {{ end }} {{ end }} - {{$showPrevNext := (and (not .Params.disableNextPrev) (not .Site.Params.disableNextPrev))}} - {{if $showPrevNext}} - {{with ($.Scratch.Get "prevPage")}} - - {{end}} - {{with ($.Scratch.Get "nextPage")}} - - {{end}} - {{end}} + {{$showPrevNext := (and (not .Params.disableNextPrev) (not .Site.Params.disableNextPrev))}} + {{if $showPrevNext}} + {{with ($.Scratch.Get "prevPage")}} + + {{end}} + {{with ($.Scratch.Get "nextPage")}} + + {{end}} + {{end}}