blob: 9f88126fc992d9ef5cfa69fec8669ae484e4d072 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
---
title: NumberOfElements
description: Returns the number of pages in the current pager.
categories: []
keywords: []
params:
functions_and_methods:
returnType: int
signatures: [PAGER.NumberOfElements]
---
```go-html-template
{{ $pages := where site.RegularPages "Type" "posts" }}
{{ $paginator := .Paginate $pages }}
{{ range $paginator.Pages }}
<h2><a href="{{ .RelPermalink }}">{{ .LinkTitle }}</a></h2>
{{ end }}
{{ with $paginator }}
{{ .NumberOfElements }}
{{ end }}
```
|