![]() |
pagination adding params - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Using CodeIgniter (https://forum.codeigniter.com/forumdisplay.php?fid=5) +--- Forum: General Help (https://forum.codeigniter.com/forumdisplay.php?fid=24) +--- Thread: pagination adding params (/showthread.php?tid=91395) |
pagination adding params - cadgiru - 08-03-2024 With codeigneter 4, can someone guide me to how to add additional parameters to links? RE: pagination adding params - ozornick - 08-03-2024 What exactly are the parameters? QUERY_STRING /users/1000?option=full ? RE: pagination adding params - cadgiru - 08-04-2024 (08-03-2024, 10:45 AM)ozornick Wrote: What exactly are the parameters? QUERY_STRING /users/1000?option=full ? RE: pagination adding params - kenjis - 08-05-2024 Quote:By default, all GET queries are shown in the pagination links. And you should read the docs carefully: https://codeigniter.com/user_guide/libraries/pagination.html#manual-pagination RE: pagination adding params - cadgiru - 08-05-2024 (08-05-2024, 12:39 AM)kenjis Wrote:Quote:By default, all GET queries are shown in the pagination links. being a newbe, I have tried what U suggested, redading docs carefully, but still at a loss... What I am basically trying to achieve is building a url something like : example.com/myview.php?a=1234&b=5678&page=4 Feel I am going in circles, as always 'the devil is in the detail' RE: pagination adding params - kenjis - 08-05-2024 1. You need to use the method correctly. If you specify incorrect parameters, it does now work as you expected. 2. Try the sample code in the User Guide to understand how the code works. 3. By default, all GET queries are shown in the pagination links. So you don't need to do an extra work. PHP Code: $pager = service('pager'); RE: pagination adding params - cadgiru - 08-06-2024 (08-05-2024, 02:57 AM)kenjis Wrote: 1. You need to use the method correctly. If you specify incorrect parameters, it does now work as you expected. 3. By default, all GET queries are shown in the pagination links. So you don't need to do an extra work What am I missing? Really going in circles, what I want is to add two GET queries to pagination, resulting in something like: example.com/myview?a=1234&b=5678&page=4. Am struggling to find how to add the GET queries. Thx in advance, all help appreciated RE: pagination adding params - kenjis - 08-06-2024 Try the sample code in the User Guide. RE: pagination adding params - cadgiru - 08-06-2024 (08-06-2024, 05:56 AM)cadgiru Wrote:@kenjis thx for Your persistence in trying to guide me in the right direction. Sadly I still must have missed something(08-05-2024, 02:57 AM)kenjis Wrote: 1. You need to use the method correctly. If you specify incorrect parameters, it does now work as you expected. |