{{ define "main" }} {{ $headless := .Site.GetPage "/homepage" }} {{ $sections := $headless.Resources.ByType "page" }} > {{ with .Params.header_headline }} {{ . }}{{ end }} {{ with .Params.header_subheadline }} {{ . }}{{ end }} {{ range where $sections ".Params.header_menu" "eq" true }} {{ .Title }} {{ end }} {{ range $index_val, $elem_val := $sections }} {{ .Title }} {{ .Content }} {{ end }} {{ end }}