{{ $page := . }} {{ $edit := $page.Param "paige.edit" | and ($page.Param "paige.page.disable_edit" | not) }} {{ $first := templates.Exists "partials/paige/page-footer-first.html" }} {{ $history := $page.Param "paige.history" | and ($page.Param "paige.page.disable_history" | not) }} {{ $last := templates.Exists "partials/paige/page-footer-last.html" }} {{ $next := $page.NextInSection | and ($page.Param "paige.page.disable_next" | not) }} {{ $prev := $page.PrevInSection | and ($page.Param "paige.page.disable_prev" | not) }} {{ if $page.File }} {{ if $edit }} {{ $edit = printf $edit $page.File.Path }} {{ end }} {{ if $history }} {{ $history = printf $history $page.File.Path }} {{ end }} {{ end }} {{ if or $edit $history $first $last $next $prev }} {{ end }}