You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
26 lines
600 B
HTML
26 lines
600 B
HTML
{{ $params := . }}
|
|
|
|
{{ $name := $params.name }}
|
|
{{ $page := $params.page }}
|
|
|
|
{{ $partial := print "paige/" (printf $name "") }}
|
|
|
|
{{ $file := print "partials/" $partial }}
|
|
|
|
{{ if templates.Exists $file }}
|
|
{{ partial $partial $page }}
|
|
{{ end }}
|
|
|
|
{{ range slice "home" "page" "section" "taxonomy" "term" }}
|
|
{{ $partial := print "paige/" (printf $name (print "-" .)) }}
|
|
|
|
{{ $file := print "partials/" $partial }}
|
|
|
|
{{ $exists := templates.Exists $file }}
|
|
{{ $matches := eq $page.Kind . }}
|
|
|
|
{{ if and $exists $matches }}
|
|
{{ partial $partial $page }}
|
|
{{ end }}
|
|
{{ end }}
|