{{ if .FirstSection }} {{- $pages := where .FirstSection.RegularPagesRecursive "Draft" "eq" false -}} {{- $previousInSection := $pages.Prev . -}} {{- $nextInSection := $pages.Next . -}} {{ if or $previousInSection $nextInSection }}
{{ end }} {{ end }}