{{ $show_descriptions := .show_descriptions }} {{ $show_images := .show_images }}
{{ range .pages }} {{- $page := false -}} {{/* Check if . is a map or page url */}} {{ if reflect.IsMap . }} {{- if .page -}} {{- $page = partial "GetPageByUrl" .page -}} {{- else if .slug -}} {{- $page = partial "GetPageByUrl" .slug -}} {{ end }} {{ else }} {{- $page = partial "GetPageByUrl" . -}} {{ end }} {{ with $page }}

{{- partial "PrepareHTML" .Title -}}

{{ if and $show_descriptions .Params.description_short }}

{{ partial "PrepareHTML" .Params.description_short }}

{{ end }} {{ if $show_images }} {{- partial "pages/page-media.html" . -}} {{ end }}
{{- end -}} {{ end }}