{{- if ( not ( isset . "sc" ) ) -}} {{- errorf "No site context received" -}} {{- end -}} {{- if ( not ( isset . "pc" ) ) -}} {{- errorf "No page context received (%q)" .sc.Page.File.Dir -}} {{- end -}} {{- if ( not ( isset . "params" ) ) -}} {{- errorf "No params given (%q)" .pc.File.Path -}} {{- end -}} {{- if ( not ( isset .params "attr" ) ) -}} {{- errorf "No attr given (%q)" .pc.File.Path -}} {{- end -}} {{- $attr := .params.attr -}} {{- $attr_link := .params.attrlink -}} {{- $attr_licence := .params.attrlicence -}} {{- $attr_licence_link := .params.attrlicencelink -}}

{{- with $attr_link -}} {{- end -}} {{- $attr | safeHTML -}} {{- if $attr_link -}} {{- end -}} {{- if $attr_licence }} ( {{- with ( index .sc.Site.Data.licences $attr_licence ) -}} {{- end -}} {{- $attr_licence -}} {{- with ( index .sc.Site.Data.licences $attr_licence ) -}} {{- end -}} ) {{- end -}}