Sort Partial (sort.html)
You can use this partial to sort specific sections the way you want. See frontmadder variables.
sorts
(collection) required: The pages collection.sortby
(string) optional: Which way would you like the pages to be sorted? Eg,Title
,Weight
,Date
.reverse
(bool) optional: Should the pages be reversed after sorting? Defaults tofalse
. Useful if you are sorting bydate
,lastmod
etc.
Example
{{- $pages := partial "sort.html" (dict "sorts" .RegularPages "sortby" "Title") }}