Nettuts CI Day 7 - 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: Nettuts CI Day 7 - Pagination Problem (/showthread.php?tid=40491) |
Nettuts CI Day 7 - Pagination Problem - El Forum - 04-10-2011 [eluser]domoench[/eluser] Hi All, I'm working through the Nettuts Day 7 Tutorial, and the pagination links are not showing up when I load my view. My code is as follows: Controller: site.php Code: <?php View: site_view.php Code: <!DOCTYPE html> My Setup: - config.php: Set my base url- 'http://localhost/ci_day7/index.php' - database.php: Set my hostname, username, password, and database db variables. - autoload.php: loaded 'database' library, and 'url' helper Does anything above stick out as a reason why the <h1> would display in the view, but the $this->pagination->create_links() line does not? Nettuts CI Day 7 - Pagination Problem - El Forum - 04-10-2011 [eluser]InsiteFX[/eluser] Your missing the line below! Code: $config['uri_segment'] = 3; InsiteFX Nettuts CI Day 7 - Pagination Problem - El Forum - 04-10-2011 [eluser]domoench[/eluser] Thanks for the response Insite - I plugged in that line, but it had no effect. My controller now reads as follows: Code: <?php Any other problems visible? Thanks. Nettuts CI Day 7 - Pagination Problem - El Forum - 04-10-2011 [eluser]DanTheMan[/eluser] Hi domoench, This is probably something you have checked however; if you have not got more records in the database (in your case 10) then if I am correct it will not output any of the pagination links. It only outputs above your limit. Dan Nettuts CI Day 7 - Pagination Problem - El Forum - 04-10-2011 [eluser]InsiteFX[/eluser] Pagination with CodeIgniter InsiteFX Nettuts CI Day 7 - Pagination Problem - El Forum - 04-11-2011 [eluser]domoench[/eluser] DanTheMan - That was it! I thought I had checked for that, but I recounted and I had created exactly 10 and no more. When I added a few more posts in my database the pagination links magically appeared. InsiteFX - Thanks for the link, looks very in-depth and slightly different in approach from the nettuts video I'm working through so I'm sure giving it a going over will help me solidify this stuff. Thanks all! Nettuts CI Day 7 - Pagination Problem - El Forum - 04-12-2011 [eluser]DanTheMan[/eluser] domoench, No problem! Im glad I could help. I have have to double check a couple of times in testing before thinking it wasn't working when it was. GL with the rest of your site. Dan |