pagination problem - 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 problem (/showthread.php?tid=39852) |
pagination problem - El Forum - 03-22-2011 [eluser]Unknown[/eluser] I can't get pagination to work quite right. The userguide wasn't as helpful with this, so I went off this site (http://godbit.com/article/pagination-with-code-igniter), but the article is a bit old. It seems to be mostly working, but the created paging links don't show the right current page. It is always stuck on 1. Any ideas? Thanks. controller Code: public function display() view Code: <?php echo anchor('browse/display/popular', 'Popular') . ' '; ?> pagination problem - El Forum - 03-22-2011 [eluser]neckbone[/eluser] I think you need to add: Code: $config['uri_segment'] = 4; I believe the default is 3, but since you're passing an extra parameter (sort), the pagination link would be the fourth segment. pagination problem - El Forum - 03-22-2011 [eluser]Unknown[/eluser] You've saved my neckbone. It works perfectly now. Thanks pagination problem - El Forum - 03-22-2011 [eluser]neckbone[/eluser] Glad I could help! |