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 }}
|
||||
<hr />
|
||||
{{ end }}
|
||||
{{ $parent := . }}
|
||||
{{ $sorted_pages := sort .Site.Pages (default "Title" .Params.sort_by) (default "asc" .Params.sort_order)}}
|
||||
{{ $sorted_pages := sort .Site.Pages "Title" "asc" }}
|
||||
{{ $valid_pages := where $sorted_pages ".Parent" "!=" nil }}
|
||||
{{ $valid_pages := where $valid_pages ".Params.hide_in_list" "!=" "true" }}
|
||||
{{ range where $valid_pages ".Parent.UniqueID" $parent.UniqueID }}
|
||||
{{ range where $valid_pages ".Parent.UniqueID" .UniqueID }}
|
||||
{{ partial "list_item.html" . }}
|
||||
{{ end }}
|
||||
</div>
|
||||
|
|
Loading…
Reference in a new issue