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/forum-20.html)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forum-23.html)
+--- Thread: Easy way to override cur_page variable in Pagination Class? (/thread-35116.html)



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()