pagination: no proper parameters |
[eluser]stoefln[/eluser]
ouch- another problem. i have following code, copied out of the CI guide: Code: $config = array(); Code: http://example.com/index.php/test/page/&per_page=20 Code: http://example.com/index.php/test/page/per_page/20
[eluser]stoefln[/eluser]
ok i found a part of the answer: i have set Code: $config['enable_query_strings'] = TRUE; but why cant i override this setting in my controller, just for my pagination, with Code: $config['enable_query_strings'] = FALSE;
[eluser]fesweb[/eluser]
The problem is that the Pagination Class has an OR, where it should have an AND. I had to copy the class into a new file in my application's /libraries/Pagination.php Then, I found two places where I changed this: Code: if ($CI->config->item('enable_query_strings') === TRUE OR $this->page_query_string === TRUE) Code: if ($CI->config->item('enable_query_strings') === TRUE AND $this->page_query_string === TRUE) You shouldn't have to change anything else, as CI will load this file in the place of the core file. Good luck. Matt
[eluser]taewoo[/eluser]
Good catch fesweb. I was banging my head for an hour trying to figure this out. Reported this in CI bug tracking- http://codeigniter.com/bug_tracker/bug/6655/
[eluser]fesweb[/eluser]
[quote author="taewoo" date="1233633257"]I was banging my head for an hour trying to figure this out.[/quote] Only an hour? You're lucky!
|
Welcome Guest, Not a member yet? Register Sign In |