{{ with where ( $.Site.Data.abbreviations .Params.abbr ) }}
{{ if ( or ( eq .Params.mode "shortTitle" ) ( eq .Params.mode "shortTitlePl" ) ) }}
{{- if ( eq .Params.mode "shortTitle" ) }}
{{ .shortTitle }}
{{ else if ( eq .Params.mode "shortTitlePl" ) }}
{{ if .shortTitlePl }}{{ .shortTitlePl }}{{ else }}{{ .shortTitle }}s{{ end }}
{{ end -}}
{{ else if ( or ( eq .Params.mode "longtitle" ) ( eq .Params.mode "longTitlePl" ) ) }}
{{- if ( eq .Params.mode "longTitle" ) }}
{{ .longTitle }}
{{ else if ( eq .Params.mode "longTitlePl" ) }}
{{ if .longTitlePl }}{{ .longTitlePl }}{{ else }}{{ .longTitle }}s{{ end }}
{{ end -}}
{{ else if ( or ( eq .Params.mode "fullTitle" ) ( eq .Params.mode "fullTitlePl" ) ) }}
{{ if ( eq .Params.mode "fullTitle" ) }}
{{ .longTitle }} ({{ .short }})
{{ else if ( eq .Params.mode "fullTitlePl" ) }}
{{- if .longTitlePl }}{{ .longTitlePl }}{{ else }}{{ .longTitle }}s{{ end -}}
({{ if .shortPl }}{{ .shortPl }}{{ else }}{{ .short }}s{{ end }})
{{ end }}
{{ end }}
{{ else }}
{{ errorf "No definition found for abbreviation '%q'" .Params.abbr }}
{{ end }}