Welcome Guest, Not a member yet? Register   Sign In
URI Routing and Pagination
#1

[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.




Theme © iAndrew 2016 - Forum software by © MyBB