I have a list template that outputs items sorting them by a Date stamp (if it exists) or by Title, and paginates them.
{{ $paginator := .Paginate .Data.Pages }}
{{ range $paginator.Pages }}
I want to sort items by price. If I change the code to
{{ range $paginator.Pages.ByParam "price" }}
- it sorts on price within each page.
If I change it to
{{ range .Pages.ByParam "price" }}
- it sorts listed items according to price, but stops paginating them - they all come out on one page as much as there are.
How I can sort the whole lot of itmes and then paginate them?
Thank you!