bunteshaus.de/themes/buha/layouts/_default/list.html
2022-06-17 17:45:53 +02:00

30 lines
916 B
HTML

{{ define "intro" }}
{{ if ne .Content "" }}
{{ partial "snippets/content" (dict "content" .Content) }}
{{ end }}
{{ end }}
{{ define "content" }}
{{- $pages := where .Site.RegularPages "Permalink" "!=" .Permalink -}}
{{- $paginator := "" -}}
{{- $partial := .Layout -}}
{{ $folder := "layout" }}
{{- $paginate := true -}}
{{ if eq .Kind "term" }}
{{- $pages = .Data.Pages -}}
{{ $partial = "gen_list" }}
{{ $folder = "news" }}
{{ else if eq .Kind "taxonomy" }}
{{ $paginate = false }}
{{- $pages = .Data.Terms.ByCount -}}
{{ $partial = "tags_n_categories" }}
{{ end }}
{{ if and $folder $partial }}
{{ $partial = string (printf "%s/%s" $folder $partial) }}
{{ partial $partial (dict "context" . "pages" $pages "content" .Content "type" .Type "paginate" $paginate) }}
{{ end }}
{{ end }}