![]() |
Pagination doesn't work :s - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived General Discussion (https://forum.codeigniter.com/forumdisplay.php?fid=21) +--- Thread: Pagination doesn't work :s (/showthread.php?tid=59618) |
Pagination doesn't work :s - El Forum - 10-28-2013 [eluser]Unknown[/eluser] Hi guys, I'm trying to use the pagination library for my website but I have some problems with it. Here is my controller code: Code: class Projets extends CI_Controller Code: class Projets_model extends CI_Model And finaly my view code: Code: <?php foreach ($projets as $projet) { So it well displays the 10 first projets title but then I have no pagination links. Please help me I watched many tutorials and my code seems allright I don't understand what's wrong. Pagination doesn't work :s - El Forum - 10-29-2013 [eluser]Flemming[/eluser] At a glance your code looks OK so first thing to make sure of is that your total_rows contains a value more than 10 $total_rows = $this->projetsManager->projets_count(); you could try just assigning a static value to $total_rows, say 50: $total_rows = 50; and see if that causes pagination links to be displayed? Pagination doesn't work :s - El Forum - 10-30-2013 [eluser]InsiteFX[/eluser] Code: liste($offset = '') Pagination doesn't work :s - El Forum - 11-01-2013 [eluser]jairoh_[/eluser] you should pass $offset like Code: public function liste( $offset ) |