diff --git a/layouts/shortcodes/cfp_dates.html b/layouts/shortcodes/cfp_dates.html index 2480a634fb7..e982df269d9 100644 --- a/layouts/shortcodes/cfp_dates.html +++ b/layouts/shortcodes/cfp_dates.html @@ -2,17 +2,19 @@ {{ $event_slug := index $path 1 }} {{ $e := (index .Page.Site.Data.events $event_slug) }} -{{ if isset $e "cfp_date_start" }} +{{ if and ($e.cfp_date_start) ($e.cfp_date_end) ($e.cfp_date_announce)}} {{ $cfp_date_start := $e.cfp_date_start }} {{ $cfp_date_end := $e.cfp_date_end }} {{ $cfp_date_announce := $e.cfp_date_announce }} - -
Call for proposals opens {{ dateFormat "Monday, Jan 2, 2006" $cfp_date_start }}.
Call for proposals closes {{ dateFormat "Monday, Jan 2, 2006" $cfp_date_end }}.
Selected proposals will be announced on {{ dateFormat "Monday, Jan 2, 2006" $cfp_date_announce }}.
+{{ else }} +
+ Call for proposals is TBD +
{{ end }} diff --git a/layouts/shortcodes/event_end.html b/layouts/shortcodes/event_end.html index 659f1f092a6..09e15fbc69e 100644 --- a/layouts/shortcodes/event_end.html +++ b/layouts/shortcodes/event_end.html @@ -3,7 +3,8 @@ {{ $e := (index .Page.Site.Data.events $event_slug) }} {{ $enddate := $e.enddate}} -{{ if isset $e "enddate" }} +{{ if $e.enddate }} + {{ $enddate := $e.enddate}} {{ dateFormat "Monday, Jan 2, 2006" $enddate }} {{ else }} TBD diff --git a/layouts/shortcodes/event_start.html b/layouts/shortcodes/event_start.html index 35a56e56b4b..e65b593691f 100644 --- a/layouts/shortcodes/event_start.html +++ b/layouts/shortcodes/event_start.html @@ -2,9 +2,8 @@ {{ $event_slug := index $path 1 }} {{ $e := (index .Page.Site.Data.events $event_slug) }} -{{ $startdate := $e.startdate}} - -{{ if isset $e "startdate" }} +{{ if $e.startdate }} + {{ $startdate := $e.startdate}} {{ dateFormat "Monday, Jan 2, 2006" $startdate }} {{ else }} TBD