19 lines
506 B
HTML
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 }}
|