docs/content/en/methods/pager/Pages.md
raw| 1 | --- |
| 2 | title: Pages |
| 3 | description: Returns the pages in the current pager. |
| 4 | categories: [] |
| 5 | keywords: [] |
| 6 | params: |
| 7 | functions_and_methods: |
| 8 | returnType: page.Pages |
| 9 | signatures: [PAGER.Pages] |
| 10 | --- |
| 11 | |
| 12 | ```go-html-template |
| 13 | {{ $pages := where site.RegularPages "Type" "posts" }} |
| 14 | {{ $paginator := .Paginate $pages }} |
| 15 | |
| 16 | {{ range $paginator.Pages }} |
| 17 | <h2><a href="{{ .RelPermalink }}">{{ .LinkTitle }}</a></h2> |
| 18 | {{ end }} |
| 19 | |
| 20 | {{ partial "pagination.html" . }} |
| 21 | ``` |