{{- $template := .block.template -}} {{- $position := .block.position -}} {{- $title := .block.title -}} {{- $class := "block block-pages" -}} {{- $layout_class := "block-pages--grid" -}} {{- with .block.data -}} {{- $layout := .layout -}} {{- $show_main_page := false -}} {{- $show_main_description := .show_main_description -}} {{- $show_descriptions := .show_descriptions -}} {{- $show_images := .show_images -}} {{- $main_description := "" -}} {{- $page_link := false -}} {{/* LEGACY */}} {{- with .show_description -}} {{- $show_descriptions = . -}} {{- end -}} {{- with .show_image -}} {{- $show_images = . -}} {{- end -}} {{- if $layout -}} {{- $layout_class = printf "block-pages--%s" $layout -}} {{- end -}} {{ $class = printf "{{$class}} %s" $layout_class }} {{- $page_class := "" -}} {{ $page := partial "GetPageByUrl" .page }} {{- with $page }} {{- $show_main_page = true -}} {{- $page_link = $page.Permalink }} {{ if eq $title "" }} {{ $title = .Title }} {{ end }} {{ if .Params.bodyclass }} {{- $page_class = printf "block-page-%s" .Params.bodyclass }} {{ end }} {{ if site.Params.pages.index.truncate_description }} {{- $main_description = partial "GetTruncateContent" ( dict "text" .Params.summary "length" site.Params.pages.index.truncate_description ) -}} {{ else }} {{- $main_description = partial "PrepareText" .Params.summary -}} {{ end }} {{ end -}}
{{- $main_description -}}
{{ end }} {{ end }}{{- $main_description -}}
{{ end }} {{ end }} {{- partial (printf "blocks/templates/pages/%s.html" $layout) (dict "pages" .pages "show_images" $show_images "show_descriptions" $show_descriptions ) }}