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