CodeIgniter Forums

Full Version: how to set the url of Pagination?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
in CI4, i useĀ $pager->makelinks()

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


I prefer "controller/function/page" than "controller/function/?page=".
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.