Refactor next, prev values

master
Will Faught 12 months ago
parent 8c09422aa0
commit 0c70c5a169

@ -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 }}
<div class="mb-3" id="paige-prev-next">
{{ with $page.PrevInSection }}
{{ with $prev }}
<p class="mb-0" id="paige-next">
<a class="link-secondary" href="{{ .Permalink }}">{{ .Title }}</a> &rsaquo;
</p>
{{ end }}
{{ with $page.NextInSection }}
{{ with $next }}
<p class="mb-0" id="paige-prev">
&lsaquo; <a class="link-secondary" href="{{ .Permalink }}">{{ .Title }}</a>
</p>

Loading…
Cancel
Save