{{- $template := .block.template -}} {{- $position := .block.position -}} {{- $title := .block.title -}} {{- with .block.data -}} {{- $layout := .layout | default "list" -}}
{{ if or $title .description }}
{{ if $title }}

{{ partial "PrepareHTML" $title }}

{{ end }} {{- if .description }}
{{ partial "PrepareHTML" .description }}
{{ end -}}
{{ end -}}
{{ range .events }} {{ $event := site.GetPage .file }} {{ with $event }} {{ partial "events/event" (dict "event" . "layout" $layout ) }} {{ end }} {{ end }}
{{ end -}}