mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-22 21:42:50 +02:00
Merge commit '8b9803425e63e1b1801f8d5d676e96368d706722'
This commit is contained in:
22
docs/content/en/methods/pager/Pages.md
Normal file
22
docs/content/en/methods/pager/Pages.md
Normal file
@@ -0,0 +1,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" . }}
|
||||
```
|
Reference in New Issue
Block a user