{{ $page := . }} {{ $fileediturl := $page.Param "paige.file_edit_url" }} {{ $filehistoryurl := $page.Param "paige.file_history_url" }} {{ $file := false }} {{ $first := templates.Exists "partials/paige/page-footer-first.html" }} {{ $last := templates.Exists "partials/paige/page-footer-last.html" }} {{ $next := $page.NextInSection }} {{ $prev := $page.PrevInSection }} {{ if $page.File }} {{ if $fileediturl }} {{ $file = true }} {{ $fileediturl = printf $fileediturl $page.File.Path }} {{ end }} {{ if $filehistoryurl }} {{ $file = true }} {{ $filehistoryurl = printf $filehistoryurl $page.File.Path }} {{ end }} {{ end }} {{ if or $file $first $last $next $prev }} {{ end }}