{{- $dir := .Get "dir" | default "" -}} {{- $imagesParam := .Get "images" | default "" -}} {{- $class := .Get "class" | default "gallery" -}} {{- if eq $dir "" -}}
gallery shortcode: dir= fehlt
{{- else -}} {{- $base := printf "img/%s" $dir -}} {{- $images := slice -}} {{- if ne $imagesParam "" -}} {{- range (split $imagesParam ",") -}} {{- $img := trim . " " -}} {{- if ne $img "" -}} {{- $images = $images | append $img -}} {{- end -}} {{- end -}} {{- else -}} {{/* Auto: alle Dateien aus static/img/Keine Bilder gefunden in /static/{{ $base }}/
{{- else -}} {{- end -}} {{- end -}}