{{/* Only displays pagination for matching menu items */}} {{- $currentPage := . -}} {{- $sectionMenu := index $.Site.Menus .Section -}} {{- $currentSection := (replace (index (findRE "([\\w]+)\\/\\z" (.CurrentSection.File.Dir) 1) 0) "/" "") -}} {{- $currentSectionMenu := index $.Site.Menus $currentSection -}} {{- $menu := cond (not (eq $currentSectionMenu "nil")) $currentSectionMenu $sectionMenu -}} {{- with $menu -}} {{- end -}} {{- define "prev" -}} {{- with .item -}} {{- end -}} {{- end -}} {{- define "next" -}} {{- with .item -}} {{- end -}} {{- end -}}