File tree Expand file tree Collapse file tree 2 files changed +5
-5
lines changed
themes/beautifulhugo/layouts/partials Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change 20
20
{{ $image := $template.image.data.attributes }}
21
21
22
22
{{/* Use {timeDescription} | {presenceMode} @ {venueName} for subtitle. */}}
23
- {{ $venueName := .attributes.venue.data.attributes.name }}
24
23
{{ $presenceMode := .attributes.presenceMode }}
25
24
{{ $timeDescription := .attributes.timeDescription }}
26
25
27
26
{{ $subtitle := "" }}
28
- {{ if or (eq $presenceMode "offline") (eq $presenceMode "hybrid") }}
27
+ {{ if and .attributes.venue (or (eq $presenceMode "offline") (eq $presenceMode "hybrid")) }}
28
+ {{ $venueName := .attributes.venue.data.attributes.name }}
29
29
{{ $subtitle = printf "%s | %s @ %s" $timeDescription $presenceMode $venueName }}
30
30
{{ else }}
31
31
{{ $subtitle = printf "%s | %s" $timeDescription $presenceMode }}
Original file line number Diff line number Diff line change 3
3
4
4
{{/* Define variables for each attribute */}}
5
5
{{ $shortDescription := $template.shortDescription }}
6
- {{ $venueDescription := .attributes.venue.data.attributes.description }}
7
6
{{ $presenceMode := .attributes.presenceMode }}
8
7
9
8
{{/* Create bullet points for requirements */}}
33
32
34
33
35
34
{{ $eventDetailsSection := printf "## Event Details\n%s" $eventDetails }}
36
- {{ if ne $presenceMode "online" }}
37
- {{ $eventDetailsSection = printf "## Event Details\n%s\n\n### Venue\n%s" $eventDetails $venueDescription }}
35
+ {{ if and .attributes.venue (ne $presenceMode "online") }}
36
+ {{ $venueDescription := .attributes.venue.data.attributes.description }}
37
+ {{ $eventDetailsSection = printf "## Event Details\n%s\n\n### Venue\n%s" $eventDetails $venueDescription }}
38
38
{{ end }}
39
39
40
40
You can’t perform that action at this time.
0 commit comments