Added for_page pagination
This commit is contained in:
parent
b260294f97
commit
d1b6c6feec
|
@ -16,7 +16,7 @@ overview page.
|
||||||
The following attributes exist on the pagination object:
|
The following attributes exist on the pagination object:
|
||||||
|
|
||||||
| Attribute | Description
|
| Attribute | Description
|
||||||
| ----------- | ------------
|
| ------------ | ------------
|
||||||
| `current` | The current record
|
| `current` | The current record
|
||||||
| `prev` | The record for the last page (might be `None`)
|
| `prev` | The record for the last page (might be `None`)
|
||||||
| `next` | The record for the net page (might be `None`)
|
| `next` | The record for the net page (might be `None`)
|
||||||
|
@ -26,6 +26,12 @@ The following attributes exist on the pagination object:
|
||||||
| `has_prev` | `True` if a previous page exists
|
| `has_prev` | `True` if a previous page exists
|
||||||
| `has_next` | `True` if a next page exists
|
| `has_next` | `True` if a next page exists
|
||||||
| `items` | The query that resolves to the children of the current page.
|
| `items` | The query that resolves to the children of the current page.
|
||||||
|
| `for_page()` | Returns the record for a different page.
|
||||||
|
|
||||||
|
The `for_page()` function accepts a page number and returns the record for
|
||||||
|
the other page.
|
||||||
|
|
||||||
|
!! *Changed in Lektor 2.0:* The `for_page()` method was added.
|
||||||
|
|
||||||
## Item Query Example
|
## Item Query Example
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue