{{ $currentPage := . -}} {{ $section := $currentPage.Section -}} {{ range (where .Site.Sections "Section" "in" $section) }} {{ range .Sections.ByWeight }} {{ $active := in $currentPage.RelPermalink .RelPermalink }}