Files
umrechner/hugo/layouts/partials/available-units.html
2026-05-27 20:04:58 +02:00

19 lines
506 B
HTML

{{ $category := .category }}
{{ $units := .units }}
{{ if eq $category "waehrungen" }}
{{ $pb := partial "available-currencies.html" . }}
{{ if $pb.ok }}
{{ $filtered := dict }}
{{ range $slug, $data := $units }}
{{ $slugLower := lower $slug }}
{{ if or (eq $slugLower "eur") (in $pb.currencies $slugLower) }}
{{ $filtered = merge $filtered (dict $slug $data) }}
{{ end }}
{{ end }}
{{ $units = $filtered }}
{{ else }}
{{ $units = dict }}
{{ end }}
{{ end }}
{{ return $units }}