{{- $context := .context -}} {{- $position := .block.position -}} {{- $title := .block.title -}} {{- $term := false -}} {{- $layout := "grid" -}} {{- with .block.data }} {{ if .layout }} {{- $layout = .layout -}} {{ end }} {{ if .category }} {{- $term = site.GetPage (printf "/categories%s" .category) -}} {{ end }}
{{ if $title -}}
{{ $title_link := false }} {{- if $term }} {{ $title_link = $term.Permalink }} {{ end -}} {{ partial "blocks/title" (dict "title" $title "context" $context "link" $title_link ) }}
{{- end }} {{- partial (printf "blocks/templates/posts/%s.html" $layout) . -}}
{{ end -}}