pagination adding params |
With codeigneter 4, can someone guide me to how to add additional parameters to links?
What exactly are the parameters? QUERY_STRING /users/1000?option=full ?
(08-03-2024, 10:45 AM)ozornick Wrote: What exactly are the parameters? QUERY_STRING /users/1000?option=full ? Quote:By default, all GET queries are shown in the pagination links. And you should read the docs carefully: https://codeigniter.com/user_guide/libra...pagination (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'
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'); (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
Try the sample code in the User Guide.
(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. |
Welcome Guest, Not a member yet? Register Sign In |