I’m trying to create a template view called “series” that uses a series taxonomy and leverages a custom frontmatter “seriesPart” to sort the articles. The idea is to keep weight as a default for ordering child pages in the default view, but when you view an article series it orders the pages via “seriesPart.”
This does not work:
{{ range sort .Pages .Params.seriesPart "asc"}}
...
{{end}}
This, interestingly, also does not work:
{{ range sort .Pages .Params.Weight "asc"}}
...
{{end}}
But this does work:
{{ range sort .Pages "Weight" "asc"}}
...
{{end}}}
- Is there an easy way to range sort via custom page params?
- Why does “Weight” work but .Params.Weight not?