Pagination does not behave as I expect - 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 does not behave as I expect (/showthread.php?tid=2083) |
Pagination does not behave as I expect - El Forum - 07-15-2007 [eluser]Unknown[/eluser] I am trying out CodeIgniter and my first experiment is just a Guestbook, but the Pagination Library does some strange things. My code is this: Code: function page($number=1) I would have expected, that I should have written Code: $data['entries'] = $this->entries->get_some_after($per_page,$per_page*$number-$per_page); I'd rather have /1, /2, /3 etc. Is there something wrong with my code, or is this the way it is meant to be? Pagination does not behave as I expect - El Forum - 07-15-2007 [eluser]Phil Sturgeon[/eluser] Yes indeed, uses offset and limit instead of page numbers. You can try the replacement library on the wiki. Pagination does not behave as I expect - El Forum - 07-18-2007 [eluser]marcoss[/eluser] Yes, it uses offsets instead of pages, but no need to use a different library, just do this. Code: function page($number=1){ |