{{ $page := . }} {{ $fileediturl := $page.Param "paige.file_edit_url" | and ($page.Param "paige.page.hide_edit" | not) }} {{ $filehistoryurl := $page.Param "paige.file_history_url" | and ($page.Param "paige.page.hide_history" | not) }} {{ $first := templates.Exists "partials/paige/page-footer-first.html" }} {{ $last := templates.Exists "partials/paige/page-footer-last.html" }} {{ $next := $page.NextInSection | and ($page.Param "paige.page.hide_next" | not) }} {{ $prev := $page.PrevInSection | and ($page.Param "paige.page.hide_prev" | not) }} {{ if $page.File }} {{ if $fileediturl }} {{ $fileediturl = printf $fileediturl $page.File.Path }} {{ end }} {{ if $filehistoryurl }} {{ $filehistoryurl = printf $filehistoryurl $page.File.Path }} {{ end }} {{ end }} {{ if or $fileediturl $filehistoryurl $first $last $next $prev }} {{ end }}