Fix broken links to event items on translated top page.

If there is no translated event entry, these links should be to
the original English entry.
main
Ryusuke SUZUKI 3 years ago
parent 20f83c0421
commit bdb3189d38

@ -18,7 +18,7 @@
<p>
<span class="txtdate">{{ dateFormat "2006-01-02" .startDate }} - {{ dateFormat "2006-01-02" .endDate }}</span>
<br />
<a href="{{.Site.BaseURL | relLangURL }}events/#{{ dateFormat "2006-01" .endDate }}:{{ $eventsCounter }}">
<a href="{{ if (fileExists $eventsPath) -}}{{ .Site.BaseURL | relLangURL }}{{ else }}{{ $.Site.BaseURL }}{{- end }}events/#{{ dateFormat "2006-01" .endDate }}:{{ $eventsCounter }}">
{{ .name }}
<br />
{{ if or (.city) (.country) }}({{end}}{{ if .city }}{{ .city }},{{ end }} {{ if .country }}{{ .country }}{{ end }}{{ if or (.city) (.country) }}){{end}}

Loading…
Cancel
Save