CodeIgniter Forums
Conceptual problem with Pagination - 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: Conceptual problem with Pagination (/showthread.php?tid=43217)



Conceptual problem with Pagination - El Forum - 07-04-2011

[eluser]Unknown[/eluser]
Hi All,

I have a page /discussion and I want to implement pagination in it. Now, I want that for the first time the page should load as /discussion, which means that this act as if it was /discussion/page/1. For the other page the url will be /discussion/page/$pagenumber.

Now, the problem is index(). Normally, I initialize all the page data in the index() and then load the view with the initialized data. But, here I'll have to initialize default page stuff in index() and then the pagination stuff in page(). So, is there a way of sending another set of data from page() to the view? I don't want to load the view since it will be loaded by the index().

However, I think it is not possible to do what I mentioned above. So, maybe I should keep my index() empty and do all the initialization in the page() and then load the view there. What do you say?


Conceptual problem with Pagination - El Forum - 07-04-2011

[eluser]toopay[/eluser]
Post elsewhere! Theres nothing which can be considered as a bug in your thread.