{{- $integrationsData := $.Site.Data.integrations -}} {{- $selectedIntegrations := partial "functions/select-integrations-by-docs-feature" (dict "integrations" $.Site.Data.integrations.integrations "feature" (.Get "key")) -}} {{- $base := delimit (first 3 (split .Page.RelPermalink "/")) "/" -}} {{- $count := len $selectedIntegrations -}} {{- if ne (len $selectedIntegrations) 0 -}} {{ if gt (len $selectedIntegrations) 1 }} {{ replace (.Get "plural_intro") "COUNT" $count }} {{ replace (.Get "plural_link") "COUNT" $count }} {{ replace (.Get "plural_outro") "COUNT" $count }} {{ else }} {{ .Get "singular_intro" }} {{ .Get "singular_link" }} {{ .Get "singular_outro" }} {{ end }} {{- end -}}