{{- define "title" -}} {{ $name := .Name }} {{ if ne ($name | lower | i18n) "" }} {{ $name = $name | lower | i18n }} {{ end }}

{{ $name }}

{{- end -}} {{- define "main" -}} {{ partial "debug" (dict "context" . "caller" "taxonomy.html") }} {{ $title := lower .Title }} {{- $paginator := slice -}} {{ $partial := "contentlayouts/list.html" }} {{ $what := printf ".Params.%s" $title }} {{- $posts := where (where .Site.RegularPages "Permalink" "!=" .Permalink) "Type" "in" .Site.Params.searchSections }} {{ if or (eq $title "about") (eq $title "featured") }} {{- $paginator = .Paginate (where $posts $what "eq" true) -}} {{ else if or (eq $title "tags") (eq $title "categories") }} {{- $paginator = .Paginate $posts -}} {{ $partial = "contentlayouts/termlist.html" }} {{ else if eq $title "events" }} {{- $paginator = .Paginate (where $posts ".Params.when" "ne" nil) -}} {{ else if eq .Section "about" }} {{- $paginator = .Paginate (where $posts ".Params.about" "eq" true) -}} {{ else }} {{- $paginator = .Paginate .Data.Pages -}} {{ end }} {{ if eq $paginator.PageNumber 1 }} {{ if ne .Content "" }}
{{ .Content }}
{{ end }} {{ end }} {{ partial $partial (dict "context" . "paginator" $paginator "amount" "5") }} {{ partial "structure/paginator" (dict "paginator" $paginator) }} {{- end -}} {{ define "sidebar" }} {{- partial "contentlayouts/menu.html" . }} {{ end }}