CodeIgniter Forums
Pagination querystring bug - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23)
+--- Thread: Pagination querystring bug (/showthread.php?tid=29209)



Pagination querystring bug - El Forum - 04-02-2010

[eluser]Sander Versluys[/eluser]
When query strings are enabled and your pagination config sets the 'page_query_string' parameter to false, it still uses a query string for pagination offset.

So it seems you can't trigger the pagination class to use uri segments when query strings are enabled.

I think this shouldn't work like that, correct?


Pagination querystring bug - El Forum - 07-01-2010

[eluser]psp83[/eluser]
I came across this problem today.

So I extended the pagination library and changed the following

Code:
$CI->config->item('enable_query_strings') === TRUE OR $this->page_query_string === TRUE

to

Code:
$CI->config->item('enable_query_strings') === TRUE && $this->page_query_string === TRUE

Now you can have query strings enabled in your config.php file and still use segment based pagination.

Hope that helps.