Simplify list code for taxonomies, terms

master
Will Faught 5 months ago
parent 92aa528ae7
commit 6482779dc5

@ -2,5 +2,5 @@
{{ $page := . }} {{ $page := . }}
{{ partial "paige/page.html" $page }} {{ partial "paige/page.html" $page }}
{{ partial "paige/list.html" (dict "page" $page) }} {{ partial "paige/list.html" $page }}
{{ end }} {{ end }}

@ -1,6 +0,0 @@
{{ define "main" }}
{{ $page := . }}
{{ partial "paige/page.html" $page }}
{{ partial "paige/list.html" (dict "page" $page "sort" true) }}
{{ end }}

@ -1,6 +0,0 @@
{{ define "main" }}
{{ $page := . }}
{{ partial "paige/page.html" $page }}
{{ partial "paige/list.html" (dict "page" $page "sort" true) }}
{{ end }}

@ -1,7 +1,4 @@
{{ $params := . }} {{ $page := . }}
{{ $page := $params.page }}
{{ $sort := $params.sort }}
{{ define "pagination" }} {{ define "pagination" }}
{{ $params := . }} {{ $params := . }}
@ -56,11 +53,11 @@
{{ $collections = $collections | and ($page.Param "paige.pages.disable_collections" | not) }} {{ $collections = $collections | and ($page.Param "paige.pages.disable_collections" | not) }}
{{ if and (not $pages) (in (slice "taxonomy" "term") $page.Kind) }} {{ if in (slice "taxonomy" "term") $page.Kind }}
{{ if not $pages }}
{{ $pages = $page.Pages }} {{ $pages = $page.Pages }}
{{ end }} {{ end }}
{{ if and $pages $sort }}
{{ $pages = sort $pages "LinkTitle" }} {{ $pages = sort $pages "LinkTitle" }}
{{ end }} {{ end }}

Loading…
Cancel
Save