![]() |
Pagination links showing up incorrectly - 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 links showing up incorrectly (/showthread.php?tid=53682) |
Pagination links showing up incorrectly - El Forum - 08-03-2012 [eluser]kaosweaver[/eluser] Ok, so, I've got a separate cache routine going from CI, (it is working fine and merges with the existing cache system on a site I'm redoing) and I've got hashtag page loading going on with some re-routing (which is also working as expected). What the issue is when the subsequent pages are accessed from the page result, it always shows the pagination link at the last number (as active), although the content of the page is the right content. Code: public function index($tag,$start='',$end='',$start_pos=0,$limit=20) Any ideas? Any other code files needed? (this is a site in the making, it isn't available to view online, I'll provide screenshots and code samples if needed) Your help is appreciated. Pagination links showing up incorrectly - El Forum - 08-03-2012 [eluser]Aken[/eluser] You need to tell the pagination class what page it's on, using the uri_segment config option. The user guide is misleading - it doesn't actually guess the URI segment, it just defaults to a specific one (3). Pagination links showing up incorrectly - El Forum - 08-07-2012 [eluser]kaosweaver[/eluser] Thanks, that was it, I was confused because the docs said: "The pagination function automatically determines which segment of your URI contains the page number." and I took that to mean it could count the number of segments in the base_url variable and then add one for the pagination location ![]() Pagination links showing up incorrectly - El Forum - 08-07-2012 [eluser]Aken[/eluser] You're definitely not the only person. |