{{ define "hero" }}
  {{ with partial "modular/_dataGetter.html" . }}
    {{ range . }}
      {{ if eq .modularLayout "hero" }}
        {{ partial "modular/hero.html" . }}
      {{end}}
    {{ end }}
  {{ end }}
{{ end }}

{{ define "body" }}
  {{ $pageObj := . }}
  {{ with partial "modular/_dataGetter.html" . }}
    {{ range . }}
      {{ if not (eq .modularLayout "hero") }}
        {{ partial (print "modular/" .modularLayout ".html") (merge . (dict "page" $pageObj) ) }}
      {{ end }}
    {{ end }}
  {{ end }}
{{ end }}