{{- $text_link := .Text -}}
{{- if strings.HasPrefix .Destination "bib:" -}}
{{- $destination := (substr .Destination 4) -}}
{{- if index $.Page.Site.Data.books.piratecarecollection $destination -}}
{{- $b := index $.Page.Site.Data.books.piratecarecollection $destination -}}
{{- if not $text_link -}}
{{- delimit $b.authors ", " " & " -}}{{- with $b.pubdate -}}, {{- substr . 0 4}}{{- end -}}.‘{{- $b.title -}}’. {{- with $b.publisher -}}{{- . -}}.{{- end -}}
{{- else -}}
{{- $text_link -}}
{{- end -}}
{{- else -}}
{{- $text_link -}}⦚bib:{{- $destination -}} not found
{{- end -}}
{{- else if strings.HasPrefix .Destination "practice:" -}}
{{- $s_destination := printf "/practice/%s" (substr .Destination 8) -}}
{{- if $.Page.Site.GetPage $s_destination -}}
{{- $practice := $.Page.Site.GetPage $s_destination -}}
{{- if not $text_link -}}
{{- $practice.Title -}}
{{- else -}}
{{- $text_link -}}
{{- end -}}
{{- else -}}
{{- $text_link -}}⦚practice:{{- $s_destination -}} not found
{{- end -}}
{{- else if strings.HasPrefix .Destination "field:" -}}
{{- $t_destination := printf "/field/%s" (substr .Destination 6) -}}
{{- if $.Page.Site.GetPage $t_destination -}}
{{- $field := $.Page.Site.GetPage $t_destination -}}
{{- if not $text_link -}}
{{- $field.Title -}}
{{- else -}}
{{- $text_link -}}
{{- end -}}
{{- else -}}
{{- $text_link -}}⦚field:{{- $t_destination -}} not found
{{- end -}}
{{- else if findRE "^.*static" .Destination -}}
{{- else -}}
{{- end -}}