{{ $pages := .pages }} {{ $parent := .parent }} {{ $current := .current }} {{ $collapse := .collapse }} {{ $top := .top }} {{ $labelledby := .labelledby }} {{ $leafSection := true }} {{ range $pages }} {{ if eq .Parent $parent }} {{ if not .IsPage }} {{ $leafSection = false }} {{ end }} {{ end }} {{ end }}