From 0c70c5a16906fc548e0f1ceedfc7697a8373b2da Mon Sep 17 00:00:00 2001 From: Will Faught Date: Fri, 12 Jul 2024 17:33:15 -0700 Subject: [PATCH] Refactor next, prev values --- layouts/partials/paige/page-footer.html | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/layouts/partials/paige/page-footer.html b/layouts/partials/paige/page-footer.html index dc9d06d6..bc946fcc 100644 --- a/layouts/partials/paige/page-footer.html +++ b/layouts/partials/paige/page-footer.html @@ -2,6 +2,8 @@ {{ $fileediturl := $page.Param "paige.file_edit_url" }} {{ $filehistoryurl := $page.Param "paige.file_history_url" }} +{{ $next := $page.NextInSection }} +{{ $prev := $page.PrevInSection }} {{ if $page.File }} {{ if $fileediturl }} @@ -18,15 +20,15 @@ {{ partial "paige/page-footer-first.html" . }} {{ end }} - {{ if or $page.PrevInSection $page.NextInSection }} + {{ if or $next $prev }}
- {{ with $page.PrevInSection }} + {{ with $prev }}

{{ .Title }}

{{ end }} - {{ with $page.NextInSection }} + {{ with $next }}

{{ .Title }}