{{ $layout := .layout }} {{ $options := .options }} {{ $agenda := .agenda }} {{ $is_sub_event := .is_sub_event }}
{{ range $agenda }} {{ if eq $layout "agenda" }}

{{ .Key | strings.FirstUpper | safeHTML }}

{{ end }} {{ range .Pages }} {{ partial "events/partials/event.html" (dict "event" . "layout" $layout "options" site.Params.events.index.options "is_sub_event" $is_sub_event )}} {{ range .Params.children_for_the_day }} {{ with (site.GetPage .path) }} {{ partial "events/partials/event.html" (dict "event" . "layout" $layout "options" $options "is_sub_event" true )}} {{ end }} {{ end }} {{ end }} {{ if eq $layout "agenda" }}
{{ end }} {{ end }}