diff --git a/layouts/_default/list.html b/layouts/_default/list.html index dede52df..60910c1e 100644 --- a/layouts/_default/list.html +++ b/layouts/_default/list.html @@ -2,5 +2,5 @@ {{ $page := . }} {{ partial "paige/page.html" $page }} -{{ partial "paige/list.html" (dict "page" $page) }} +{{ partial "paige/list.html" $page }} {{ end }} diff --git a/layouts/_default/taxonomy.html b/layouts/_default/taxonomy.html deleted file mode 100644 index f3b2ef9d..00000000 --- a/layouts/_default/taxonomy.html +++ /dev/null @@ -1,6 +0,0 @@ -{{ define "main" }} -{{ $page := . }} - -{{ partial "paige/page.html" $page }} -{{ partial "paige/list.html" (dict "page" $page "sort" true) }} -{{ end }} diff --git a/layouts/_default/term.html b/layouts/_default/term.html deleted file mode 100644 index f3b2ef9d..00000000 --- a/layouts/_default/term.html +++ /dev/null @@ -1,6 +0,0 @@ -{{ define "main" }} -{{ $page := . }} - -{{ partial "paige/page.html" $page }} -{{ partial "paige/list.html" (dict "page" $page "sort" true) }} -{{ end }} diff --git a/layouts/partials/paige/list.html b/layouts/partials/paige/list.html index da5744c2..e08e7159 100644 --- a/layouts/partials/paige/list.html +++ b/layouts/partials/paige/list.html @@ -1,7 +1,4 @@ -{{ $params := . }} - -{{ $page := $params.page }} -{{ $sort := $params.sort }} +{{ $page := . }} {{ define "pagination" }} {{ $params := . }} @@ -56,11 +53,11 @@ {{ $collections = $collections | and ($page.Param "paige.pages.disable_collections" | not) }} -{{ if and (not $pages) (in (slice "taxonomy" "term") $page.Kind) }} - {{ $pages = $page.Pages }} -{{ end }} +{{ if in (slice "taxonomy" "term") $page.Kind }} + {{ if not $pages }} + {{ $pages = $page.Pages }} + {{ end }} -{{ if and $pages $sort }} {{ $pages = sort $pages "LinkTitle" }} {{ end }}