{{ $page := . }} {{ if $page.Pages }} {{ if $page.Param "paige.section_pages.full_pages" }} {{ $p := $page.Paginate $page.Pages }}
{{ range $p.Pages }} {{ partial "paige/article.html" (dict "fullpages" true "page" .) }} {{ end }}
{{ if or $p.HasPrev $p.HasNext }}
{{ partial "paige/pagination.html" $page }}
{{ end }} {{ else }}
{{ range (where $page.Pages "Params.paige.pin" true).ByPublishDate.Reverse }} {{ partial "paige/page.html" . }} {{ end }} {{ $p := $page.Paginate ($page.Pages.ByPublishDate.Reverse.GroupByPublishDate "January 2006") }} {{ range $p.PageGroups }}

{{ .Key }}

{{ range .Pages }} {{ partial "paige/page.html" . }} {{ end }} {{ end }}
{{ if or $p.HasPrev $p.HasNext }}
{{ partial "paige/pagination.html" $page }}
{{ end }} {{ end }} {{ end }}