summaryrefslogtreecommitdiffstats
path: root/docs/content/en/methods/pager/Pages.md
blob: 1c049d53ba93659e498d112cc6348f2598649e85 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
---
title: Pages
description: Returns the pages in the current pager.
categories: []
keywords: []
action:
  related:
    - methods/page/Paginate
  returnType: page.Pages
  signatures: [PAGER.Pages]
---

```go-html-template
{{ $pages := where site.RegularPages "Type" "posts" }}
{{ $paginator := .Paginate $pages }}

{{ range $paginator.Pages }}
  <h2><a href="{{ .RelPermalink }}">{{ .LinkTitle }}</a></h2>
{{ end }}

{{ template "_internal/pagination.html" . }}
```