{{- /* Map of control id -> page, for resolving `related` references. Call through partialCached: the map is the same for every page. */ -}} {{- $index := dict -}} {{- range where site.RegularPages "Section" "controls" -}} {{- $p := . -}} {{- with $p.Params.id -}} {{- $index = merge $index (dict . $p) -}} {{- end -}} {{- end -}} {{- return $index -}}