forked from contributte/datagrid
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
b8f0bd8
commit 67cd8ec
Showing
3 changed files
with
35 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
Table of contents | ||
|
||
- [Pagination](#pagination) | ||
- [Custom template](#custom-template) | ||
|
||
# Pagination | ||
|
||
You can **disable** pagination, if you don't want to use it: | ||
|
||
```php | ||
$datagrid->setPagination(false); | ||
``` | ||
|
||
You can set custom items count per page: | ||
|
||
```php | ||
$datagrid->setItemsPerPageList([10, 20, 50, 100, 200, 500]); | ||
``` | ||
|
||
You can set default items per page: | ||
|
||
```php | ||
$datagrid->setDefaultPerPage(50); | ||
``` | ||
|
||
## Custom template | ||
|
||
You can set custom template for pagination: | ||
|
||
```php | ||
$datagrid->setCustomPaginatorTemplate(__DIR__ . '/templates/datagrid/pagination.latte'); | ||
``` | ||
|
||
See `DatagridPaginator/templates/data_grid_paginator.latte` for default template as an example. |