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