Welcome Guest, Not a member yet? Register   Sign In
pagination using query strings despite not being specified
#1

[eluser]umbongo[/eluser]
I am using the pagination class and it is appending '&per_page=20' on to the end of my URLs instead of /20/ or whatever. This is despite me not having set $config['page_query_string'] = TRUE. It continues even despite setting it to false.
There is also no pagination.php in /config.

???
#2

[eluser]developer10[/eluser]
[quote author="umbongo" date="1287780372"]I am using the pagination class and it is appending '&per_page=20' on to the end of my URLs instead of /20/ or whatever. This is despite me not having set $config['page_query_string'] = TRUE. It continues even despite setting it to false.
There is also no pagination.php in /config.

???[/quote]

pagination.php should be residing in CI's main folder "/libraries"
#3

[eluser]umbongo[/eluser]
OK, well i don't have it in my application/libraries folder
#4

[eluser]developer10[/eluser]
[quote author="umbongo" date="1287786989"]OK, well i don't have it in my application/libraries folder[/quote]

look in /system/libraries, not /application/libraries
#5

[eluser]umbongo[/eluser]
yes. i know it is there, but it was my understanding it wasn't used unless it was loaded into the application folder. It isn't obeying the settings which are in there either so i guess this is true.

So, any idea why I am getting query strings, as first post?
#6

[eluser]developer10[/eluser]
[quote author="umbongo" date="1287788811"]yes. i know it is there, but it was my understanding it wasn't used unless it was loaded into the application folder. It isn't obeying the settings which are in there either so i guess this is true.

So, any idea why I am getting query strings, as first post?[/quote]

no, that's the main library, so it is used. of course, you CAN have your own (located in application/libraries) but i dont know many details since i never used my own pagination library.

Regarding your issue, i really dont know. I would recommend switching to uri segments, but obviously you have valid reasons for sticking with query strings.
However, if you are like me when started with CI, you probably still prefer query strings over segments, but trust me, it's worth trying uri segments. you can accomplish anything you normally can with query strings, plus your URLs look nice and clean (/class/method/param1/param2/param3/..etc)
#7

[eluser]umbongo[/eluser]
You misunderstand, i am TRYING to use uri segments (although yes, i initially felt more comfortable with query strings), but the pagination class is spitting out the query string, despite being set to $page_query_string = FALSE; in both the system/library and my controller!
#8

[eluser]developer10[/eluser]
[quote author="umbongo" date="1287795045"]You misunderstand, i am TRYING to use uri segments (although yes, i initially felt more comfortable with query strings), but the pagination class is spitting out the query string, despite being set to $page_query_string = FALSE; in both the system/library and my controller![/quote]

well, go to http://ellislab.com/codeigniter/user-guide/ and look for pagination (you can use search box). do all it says for making pagination work.
Dont use any other config items beside those mentioned there. after you succeeded in making pagination work correctly, begin adjusting it to your own flavor.

maybe your pagination file is not refreshed in localhost root directory or unaltered copy of config.php is run from cache. Try anything to make sure the changes are valid (talking about setting FALSE back for querystrings)




Theme © iAndrew 2016 - Forum software by © MyBB