• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
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, 04:31 PM
Pagination - Am I Missing something about per_page? - by El Forum - 01-01-2010, 05:29 PM
Pagination - Am I Missing something about per_page? - by El Forum - 01-01-2010, 06:27 PM
Pagination - Am I Missing something about per_page? - by El Forum - 01-02-2010, 12:50 AM
Pagination - Am I Missing something about per_page? - by El Forum - 01-02-2010, 06:18 AM

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


Users browsing this thread:
1 Guest(s)


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2019 MyBB Group.