{{ define "main" }}
{{ if or .Params.cantorpreisträger (where (where .Site.RegularPages "Title" (print "Abiturienten " .Params.Title ) ) "Type" "=" "abiturienten") }}
{{ range where (where .Site.RegularPages "Title" .Params.Title ) "Type" "=" "cantorpreis" }} {{ end }} {{ range where (where .Site.RegularPages "Title" (print "Abiturienten " .Params.Title ) ) "Type" "=" "abiturienten" }}

{{ .Title }}

{{ $abiturdurchschnitte := getJSON "static/data/abiturdurchschnitte.json" }} {{ range $abiturdurchschnitte.abiturdurchschnitte }} {{ if eq (string (index . "jahr")) "2008" }}

Abiturdurchschnitt: {{ .schnitt }}

{{ end }} {{ end }}
{{ end }} {{ end }} {{ range .Params.topics }} {{ partial "modal" . }} {{ end }} {{ if and .Params.pretext (ne .Params.pretext "\n\n\n") }} {{ partial "modal" (dict "title" .Title "content" .Params.pretext) }} {{ end }}
{{ $topics := slice }} {{ if .Params.pretext }} {{ $topics = $topics | append (slice (slice .Params.Title 200 (md5 .Title))) }} {{ else }} {{ $topics = $topics | append (slice (slice .Params.Title 200)) }} {{ end }} {{ range .Params.topics }} {{ if .superhaufen.enable }} {{ $topics = $topics | append (slice (slice .title 30 (.superhaufen.link | urlize) "superhaufen" )) }} {{ else }} {{ $topics = $topics | append (slice (slice .title 30 (md5 .title) )) }} {{ end }} {{ end }} {{ .Content }}
{{ end }}