{{- if strings.HasPrefix .Destination "http" -}} {{ .Text }} {{- else -}} {{ $ignore := slice (.Page.Resources.GetMatch "banner*") }} {{ $images := .Page.Resources.ByType "image" }} {{ $images = complement $ignore $images }} {{ if where (.Page.Resources.ByType "image") ".File.TranslationBaseName" "!=" "banner*" }} {{ $nr := .Destination }} {{- $pic := index $images (sub (int $nr) 1) -}} {{- $image := .Page.Resources.GetMatch (printf "%s" ($pic | safeURL)) -}} {{ if ne $image nil }}