- {{ end }}
-{{ end }}
\ No newline at end of file
+ {{ $prev := .Params.prev | default (cond (or .Scratch.Get "reversePagination") .NextInSection .PrevInSection) }}
+ {{ $next := .Params.next | default (cond (or .Scratch.Get "reversePagination") .PrevInSection .NextInSection) }}
+
+ {{ with $prev }}
+ {{ $prev = $.Site.GetPage . }}
+ {{ end }}
+ {{ with $next }}
+ {{ $next = $.Site.GetPage . }}
+ {{ end }}
+
+ {{ if or $prev $next }}
+