pagination didn't work - 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 didn't work (/showthread.php?tid=24319) |
pagination didn't work - El Forum - 11-08-2009 [eluser]mah0001[/eluser] Can you re-post your controller code? pagination didn't work - El Forum - 11-08-2009 [eluser]marjune[/eluser] Code: function index(){ pagination didn't work - El Forum - 11-08-2009 [eluser]mah0001[/eluser] Change the Code: $config['per_page']=2; 1. test if any of the URLs return anything: <yoursite>/index.php/furom/index/ <yoursite>/index.php/furom/index/2 <yoursite>/index.php/furom/index/4 <yoursite>/index.php/furom/2 2. You need to check if your index() function is being called when you try the above URLs. Put a print statement inside the index function to confirm. 3. Post the results of the tests 1 and 2. pagination didn't work - El Forum - 11-08-2009 [eluser]marjune[/eluser] ok, i confirmed that the index() function was being called when i try this urls <yoursite>/index.php/furom/index/4, <yoursite>/index.php/furom/index/2, and <yoursite>/index.php/furom/index/ because i print a test in the index() function then the test appears for those urls, but the page was not found if i used this <yoursite>/index.php/furom/2 pagination didn't work - El Forum - 11-08-2009 [eluser]mah0001[/eluser] On any pages except the first page, you don't see the pagination bar or the db rows? Could you post your view code? pagination didn't work - El Forum - 11-08-2009 [eluser]marjune[/eluser] in my view Code: <?php echo $this->pagination->create_links(); ?> pagination like this 1 2 3 4 > Last › pagination didn't work - El Forum - 11-08-2009 [eluser]mah0001[/eluser] But do you see it displayed on the pages: <yoursite>/index.php/furom/index/2 <yoursite>/index.php/furom/index/4 pagination didn't work - El Forum - 11-08-2009 [eluser]marjune[/eluser] no changes in these urls <yoursite>/index.php/furom/index/2, <yoursite>/index.php/furom/index/4 same as <yoursite>/index.php/furom output pagination didn't work - El Forum - 11-08-2009 [eluser]mah0001[/eluser] What do you mean by no change? do you see the same records on /index/2 or /index/4 pages or you see nothing on any page? Could you explain the output of the pages a bit more? pagination didn't work - El Forum - 11-08-2009 [eluser]marjune[/eluser] i mean the out put of /index/2 and /index/4 is the same records of /index.php/furom |