summaryrefslogtreecommitdiffstats
path: root/docs/content/en/methods/pager/PageSize.md
diff options
context:
space:
mode:
Diffstat (limited to 'docs/content/en/methods/pager/PageSize.md')
-rw-r--r--docs/content/en/methods/pager/PageSize.md24
1 files changed, 24 insertions, 0 deletions
diff --git a/docs/content/en/methods/pager/PageSize.md b/docs/content/en/methods/pager/PageSize.md
new file mode 100644
index 000000000..a400f929a
--- /dev/null
+++ b/docs/content/en/methods/pager/PageSize.md
@@ -0,0 +1,24 @@
+---
+title: PageSize
+description: Returns the maximum number of pages per pager.
+categories: []
+keywords: []
+action:
+ related:
+ - methods/page/Paginate
+ returnType: int
+ signatures: [PAGER.PageSize]
+---
+
+```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 }}
+ {{ .PageSize }}
+{{ end }}
+```