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=26240) |
Pagination Problem - El Forum - 01-09-2010 [eluser]Unknown[/eluser] On using pagination class, link to 2nd page shows 1 in URL. I want my visitors to know that they are going to 2nd page. If it shows 1 in URL, that will confuse anyone. How can I solve this? Pagination Problem - El Forum - 01-09-2010 [eluser]gigas10[/eluser] Provide us with some code please. Pagination Problem - El Forum - 01-09-2010 [eluser]Unknown[/eluser] Code: $config['base_url'] = $this->config->site_url().'/welcome/page'; In the model, I have: Code: function getAllSites($page, $perpage) { This code works absolutely fine. There is no problem with the code. The way it behaves is weird. Click on link for page 2 has a URL like http://localhost/review/index.php/reviews/id/1 Page 2 has '1' in the link which is what I didn't like. Is there any way to fix this so that Page 1 shows 1 in the URL and Page 2 shows '2'? I can then modify my model accordingly. The problem with this URL is that it confuses people, they thing its first page when its actually seconds. Am I missing something? |