I am using the KNP Paginator bundle for pagination. Does anyone know how to append parameters to the generated url?
Here is my set up:
{{ knp_pagination_sortable(supplierProducts, 'Product Sku', 'p.name') }}
I want to add §ion=supplier to the end of the URL, I just have no clue how to do it. I looked through the docs but did not find any info.
Please help if you can.
Thanks.
As of 2020, and KnpPaginatorBundle v5.3, the solution proposed by @likeitlikeit doesn't work because the
setParam
method doesn't exist any more.But you can append parameters to the sort and pagination links directly in the knp helpers in twig:
For example, if you want to include the query parameters in the sort and pagination links, you can do: