CodeIgniter Forums
how to set the url of Pagination? - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: CodeIgniter 4 (https://forum.codeigniter.com/forum-28.html)
+--- Forum: CodeIgniter 4 Discussion (https://forum.codeigniter.com/forum-31.html)
+--- Thread: how to set the url of Pagination? (/thread-66681.html)



how to set the url of Pagination? - startbbs - 11-20-2016

in CI4, i useĀ $pager->makelinks()

it seems that the default url of pagination is "?page="
How can I define my own url style?

Thanks!

I prefer "controller/function/page" than "controller/function/?page=".


RE: how to set the url of Pagination? - kilishan - 11-21-2016

If you use the pagination capabilities built into the model, then you can't. You would need to do the pagination manually. Just know that will potentially conflict with other routes you may want to use since you're now adding an additional segment to the URI.