--- title: TotalPages description: Returns the number of pagers in the pager collection. categories: [] keywords: [] action: related: - methods/pager/PageNumber - methods/page/Paginate returnType: int signatures: [PAGER.TotalPages] --- Use the `TotalPages` method to build navigation between pagers. ```go-html-template {{ $pages := where site.RegularPages "Type" "posts" }} {{ $paginator := .Paginate $pages }} {{ range $paginator.Pages }}

{{ .LinkTitle }}

{{ end }} {{ with $paginator }}

Pager {{ .PageNumber }} of {{ .TotalPages }}

{{ end }} ```