PageGroups
Returns the page groups in the current pager.
Syntax
PAGER.PageGroups
Returns
page.PagesGroup
Use the PageGroups
method with any of the grouping methods.
{{ $pages := where site.RegularPages "Type" "posts" }}
{{ $paginator := .Paginate ($pages.GroupByDate "Jan 2006") }}
{{ range $paginator.PageGroups }}
<h2>{{ .Key }}</h2>
{{ range .Pages }}
<h3><a href="{{ .RelPermalink }}">{{ .LinkTitle }}</a></h3>
{{ end }}
{{ end }}
{{ partial "pagination.html" . }}
Last updated:
June 15, 2025
:
content: Update to align with v0.146.0 template system (phase 1) (0015e7a9b)
Improve this page