• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
how to set the url of Pagination?

#1
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=".
Q&A for Codeigniter
StartBBS--open-source, light weight forum software.
Best VPS:Digital Ocean
Reply

#2
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.
Practical CodeIgniter 3  • CodeIgniter 4 Foundations - Coming Soon • Vulcan - CLI Tools for CI4
Reply


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


Users browsing this thread:
1 Guest(s)


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2017 MyBB Group.