![]() |
[SOLVED] CI4 Pagination don't work fine - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Using CodeIgniter (https://forum.codeigniter.com/forumdisplay.php?fid=5) +--- Forum: General Help (https://forum.codeigniter.com/forumdisplay.php?fid=24) +--- Thread: [SOLVED] CI4 Pagination don't work fine (/showthread.php?tid=76816) |
[SOLVED] CI4 Pagination don't work fine - rodrigo76 - 06-23-2020 Hi to all, i use CI 4.0.3 and I read CI4 documentation : https://codeigniter.com/user_guide/libraries/pagination.html This is my controller: PHP Code: <?php namespace App\Controllers; This is my model : PHP Code: <?php namespace App\Models; In my php Page I wrote this: PHP Code: <?= $pager->links()?> BUT, in my web page I watch only an "1" (I attached an image); this is the HTML rendered by previous code: PHP Code: ... In my database I have 12 records and if I play with pagination's params I see different records. Where I am wrong? ![]() ![]() Many thanks for your help! Rodrigo RE: CI4 Pagination don't work fine - rodrigo76 - 06-24-2020 I solved with this code: Controller: PHP Code: <?php namespace App\Controllers; Page : PHP Code: <?= $pager->makeLinks($currPage, $recordsForPage, $countAll) ?> RE: [SOLVED] CI4 Pagination don't work fine - Leo - 06-27-2020 Thanks! This line did it for me <?= $pager->makeLinks($currPage, $recordsForPage, $countAll) ?>! |