Simplify list page
This commit is contained in:
parent
7b46565f26
commit
21f3a23096
1 changed files with 2 additions and 4 deletions
|
@ -5,11 +5,9 @@
|
||||||
{{ if .Content }}
|
{{ if .Content }}
|
||||||
<hr />
|
<hr />
|
||||||
{{ end }}
|
{{ end }}
|
||||||
{{ $parent := . }}
|
{{ $sorted_pages := sort .Site.Pages "Title" "asc" }}
|
||||||
{{ $sorted_pages := sort .Site.Pages (default "Title" .Params.sort_by) (default "asc" .Params.sort_order)}}
|
|
||||||
{{ $valid_pages := where $sorted_pages ".Parent" "!=" nil }}
|
{{ $valid_pages := where $sorted_pages ".Parent" "!=" nil }}
|
||||||
{{ $valid_pages := where $valid_pages ".Params.hide_in_list" "!=" "true" }}
|
{{ range where $valid_pages ".Parent.UniqueID" .UniqueID }}
|
||||||
{{ range where $valid_pages ".Parent.UniqueID" $parent.UniqueID }}
|
|
||||||
{{ partial "list_item.html" . }}
|
{{ partial "list_item.html" . }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Reference in a new issue