Welcome Guest, Not a member yet? Register   Sign In
Pagination - Am I Missing something about per_page?
#5

[eluser]developer10[/eluser]
even though i have prevously successfully implemented pagination in CI, i didn't realize until now that its solely purpose is that what you're saying about - only displaying links.

i was tricked by that config item per_page. i thought it existed in order for the class to know how many records to show per page. i know now that it is needed because pagination class
must calculate how many (numeric) links it will generate below the records.

i might just ask one more question: how do you handle $base_url for pagination when there might occur different number of uri segments?

i went with associative uris, putting some (IF)logic, which checked if there were possible uri segments and appending them to the end of $base accordingly. it worked well, and if there's
no better solution, i'll just stick to it.


Messages In This Thread
Pagination - Am I Missing something about per_page? - by El Forum - 01-01-2010, 03:31 PM
Pagination - Am I Missing something about per_page? - by El Forum - 01-01-2010, 04:29 PM
Pagination - Am I Missing something about per_page? - by El Forum - 01-01-2010, 05:27 PM
Pagination - Am I Missing something about per_page? - by El Forum - 01-01-2010, 11:50 PM
Pagination - Am I Missing something about per_page? - by El Forum - 01-02-2010, 05:18 AM



Theme © iAndrew 2016 - Forum software by © MyBB