diff --git a/layouts/partials/blocks/templates/agenda.html b/layouts/partials/blocks/templates/agenda.html index d82332429b036cdd3efc91e761663a494978ed24..cdcdff462012351320b4d1e43cec7d3ec182c990 100644 --- a/layouts/partials/blocks/templates/agenda.html +++ b/layouts/partials/blocks/templates/agenda.html @@ -16,21 +16,26 @@ "description" .description )}} - <div class="events events--{{- $layout -}}"> - {{ range .events }} - {{ $event := site.GetPage .file }} - {{ with $event }} - {{ partial "events/event" (dict - "event" . - "layout" $layout - "show_summary" $show_summary - "show_category" $show_category - "show_status" $show_status - "heading" (printf "h%d" $block.ranks.children) - ) }} + {{ if .events }} + <div class="events events--{{- $layout -}}"> + {{ range .events }} + {{ $event := site.GetPage .file }} + {{ with $event }} + {{ partial "events/event" (dict + "event" . + "layout" $layout + "show_summary" $show_summary + "show_category" $show_category + "show_status" $show_status + "heading" (printf "h%d" $block.ranks.children) + ) }} + {{ end }} {{ end }} - {{ end }} - </div> + </div> + {{ else if .no_event_message }} + <p>{{ partial "PrepareHTML" .no_event_message }}</p> + {{ end }} + </div> </div> </div>