CodeIgniter Forums
Easy way to override cur_page variable in Pagination Class? - 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: Easy way to override cur_page variable in Pagination Class? (/showthread.php?tid=35116)



Easy way to override cur_page variable in Pagination Class? - El Forum - 10-19-2010

[eluser]dynZack[/eluser]
I'm using Ajax (jQuery) to fetch paginated content. Since the URL does not change (actually only the hash changes), the Pagination class always sets the current page to the first.

Is it possible to override the cur_page variable without altering/extending the library?


Easy way to override cur_page variable in Pagination Class? - El Forum - 10-19-2010

[eluser]Greg Aker[/eluser]
just pass it in the array to $this->pagination->initialize()