Simplify list code for taxonomies, terms
This commit is contained in:
@@ -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 }}
|
||||||
{{ $pages = $page.Pages }}
|
{{ if not $pages }}
|
||||||
{{ end }}
|
{{ $pages = $page.Pages }}
|
||||||
|
{{ end }}
|
||||||
|
|
||||||
{{ if and $pages $sort }}
|
|
||||||
{{ $pages = sort $pages "LinkTitle" }}
|
{{ $pages = sort $pages "LinkTitle" }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user