CodeIgniter Forums
URI Routing and 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: URI Routing and Pagination (/showthread.php?tid=35725)



URI Routing and Pagination - El Forum - 11-09-2010

[eluser]Unknown[/eluser]
EDIT: Update: I found the right way of doing this from this article by Andrew Woods

Hello all you awesome people.

I have finally taken up CI as the framework for my first Web Application. I have got some parts working, but now I am stuck on this.

My default controller loaded is feed.php .

It has a model, which it loads, to pull out data from a database and pass the data to the respective view. All that is working.

Now when I go to http://example.com/ I can see the data per row. Today I added pagination to all this. So now I have the pagination working like this: http://example.com/feed/index/n where n is the page number generated by CI.

I would like if you guys helped me to turn the above looooong url into something like: http://example.com/n where n is the page number.

Also, would http://example.com/n or http://example.com/feed/n would be better?

Please take note that I'm a beginner with CI so good directions on doing what is to be done would be great.

Thanks in advance.