{{- $version := .version -}} {{- $pageUrl := .pageUrl -}} {{- $scratch := newScratch -}} {{ range .section }} {{ if eq (index (split .File.Path "/") 1 ) $version }} {{ $scratch.Add "sectionsForVersion" (slice .)}} {{ end }} {{ end }} {{ if (ne ($scratch.Get "sectionsForVersion") nil) and (gt (len ($scratch.Get "sectionsForVersion")) 0) }}