--- title: HasPrev description: Reports whether there is a pager before the current pager. categories: [] keywords: [] params: functions_and_methods: returnType: bool signatures: [PAGER.HasPrev] --- Use the `HasPrev` 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 `HasPrev` method: ```go-html-template {{ $pages := where site.RegularPages "Type" "posts" }} {{ $paginator := .Paginate $pages }} {{ range $paginator.Pages }}

{{ .LinkTitle }}

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