{{ define "main" }} {{ $.Scratch.Set "highlighted_events" slice }} {{ range .Pages }} {{ if isset .Params "event_start" }} {{ $event_start := .Params.event_start | time }} {{ if le now $event_start }} {{ $.Scratch.Add "highlighted_events" . }} {{ end }} {{ end }} {{ end }} {{ if (gt ($.Scratch.Get "highlighted_events" | len) 0) }}