mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-21 21:35:28 +02:00
Merge commit '5e078383a787e8b5ec3ba73f05ea4130840afbe2'
This commit is contained in:
@@ -50,7 +50,7 @@ For a given **Page**, it's one of the options above. The `.Paginator` is static
|
||||
The global page size setting (`Paginate`) can be overridden by providing a positive integer as the last argument. The examples below will give five items per page:
|
||||
|
||||
* `{{ range (.Paginator 5).Pages }}`
|
||||
* `{{ $paginator := .Paginate (where .Pages "Type" "post") 5 }}`
|
||||
* `{{ $paginator := .Paginate (where .Pages "Type" "posts") 5 }}`
|
||||
|
||||
It is also possible to use the `GroupBy` functions in combination with pagination:
|
||||
|
||||
@@ -75,7 +75,7 @@ If you use any filters or ordering functions to create your `.Paginator` *and* y
|
||||
The following example shows how to create `.Paginator` before its used:
|
||||
|
||||
```
|
||||
{{ $paginator := .Paginate (where .Pages "Type" "post") }}
|
||||
{{ $paginator := .Paginate (where .Pages "Type" "posts") }}
|
||||
{{ template "_internal/pagination.html" . }}
|
||||
{{ range $paginator.Pages }}
|
||||
{{ .Title }}
|
||||
|
Reference in New Issue
Block a user