You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+10-2Lines changed: 10 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -22,7 +22,7 @@ chapter of the documentation.
22
22
23
23
## Requirements:
24
24
25
-
- Knp Pager component `>=2.0`.
25
+
- Knp Pager component `>=4.4`.
26
26
- KnpPaginatorBundle's master is compatible with Symfony `>=6.4` versions.
27
27
- Twig `>=3.0` version is required if you use the Twig templating engine.
28
28
@@ -71,19 +71,23 @@ public function registerBundles()
71
71
72
72
### Configuration example
73
73
74
-
You can configure default query parameter names and templates
74
+
You can configure default query parameter names and templates, and a few other options:
75
75
76
76
#### YAML:
77
77
```yaml
78
78
knp_paginator:
79
+
convert_exception: false # throw a 404 exception when an invalid page is requested
79
80
page_range: 5# number of links shown in the pagination menu (e.g: you have 10 pages, a page_range of 3, on the 5th page you'll see links to page 4, 5, 6)
81
+
remove_first_page_param: false # remove the page query parameter from the first page link
80
82
default_options:
81
83
page_name: page # page query parameter name
82
84
sort_field_name: sort # sort field query parameter name
83
85
sort_direction_name: direction # sort direction query parameter name
84
86
distinct: true # ensure distinct results, useful when ORM queries are using GROUP BY statements
85
87
filter_field_name: filterField # filter field query parameter name
86
88
filter_value_name: filterValue # filter value query parameter name
89
+
page_out_of_range: ignore # ignore, fix, or throwException when the page is out of range
90
+
default_limit: 10# default number of items per page
0 commit comments