Welcome Guest, Not a member yet? Register   Sign In
confusing documentation
#1

[eluser]hbr[/eluser]
Hi,

I would like to point a little confusion in the docs regarding pagination.

I posted my problem in this thread.

The docs are talking about page numbers when explaining how the class works while it seems to be offset numbers which is totally different.

It is very confusing. As a beginner in CI, i've spent days trying to make it work and didn't think about this little detail 1 second until a forum member helped me in that post. It was so obvious to me, a page is a page, an offset is an offset.

If a per_page = 10 and we would like to display page 3, then the offset to pass to the SQL query is (page - 1) * per_page , and we get offset 20
Which means that the url has to be like index.php/controller/page/20 and not index.php/controller/page/3

For a front end user, a /3 is far more easy to understand than a /20 when displaying page n°3, especially that all CI urls are 'user-friendly' (since they are SEOed).

So unless I am missing a big point in this whole thing, it would be really cool to modify (officially) this class so it takes the real page number...or correct the docs Smile

thanks




Theme © iAndrew 2016 - Forum software by © MyBB