Welcome Guest, Not a member yet? Register   Sign In
Pagination of Home page

Hi guys, I would like to insert pagination on my front page.
should I get number of page from _GET and set LIMIT in my model ?
Let's imageine if our url was like this index.php/blog/1 or index.php/blog or index.php/blog/20
Page number is number of segment.

I would like to show 10 news per page.
So my algoritm should be like this

If uri segment is null or 0 orr <1, page number is 1.
else model function limit should be between Segment3 and segment3 x 10.
Next link should point to uri segment + 1.
Last page link should be equal to number of ID / number of news per page (number of id/10)

Is it right? How should it be?
Suggest me please
It would be nice if you can show me code or example. thanks.

Please note I used CI pagination in single pages. But can't use it on frontpage

Theme © iAndrew 2016 - Forum software by © MyBB