--- title: HasNext description: Reports whether there is a pager after the current pager. categories: [] keywords: [] action: related: - methods/pager/HasPrev - methods/pager/Prev - methods/pager/Next - methods/pager/First - methods/pager/Last - methods/page/Paginate returnType: bool signatures: [PAGER.HasNext] --- Use the `HasNext` 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 }} {{ end }} ``` You can also write the above without using the `HasNext` method: ```go-html-template {{ $pages := where site.RegularPages "Type" "posts" }} {{ $paginator := .Paginate $pages }} {{ range $paginator.Pages }}

{{ .LinkTitle }}

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