Files
umrechner/hugo/layouts/partials/available-units.html

18 lines
461 B
HTML

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