HOWTO: Paginated pages containing two different content types

It took me an hour to work this one out, so thought I would post it here in case anyone else wants to implement it:

{{ $paginator := .Paginate (where .Site.Pages "Type" "in" (slice "contenttype1" "contenttype2")) }}
{{ range $paginator.Pages }}
{{ .Render "summary" }}
{{ end }}
{{ partial "pagination.html" . }}
3 Likes