{{ define "main" }} {{ $partial := print "partials/home/" .Site.Params.homepage.layout ".html" }} {{ if templates.Exists $partial }} {{ partial $partial . }} {{ else }} {{ partial "partials/home/page.html" . }} {{ end }} {{ end }}