Welcome Guest, Not a member yet? Register   Sign In
Help with pagination (use page numbers) :(
#1

[eluser]victorche[/eluser]
I like the new feature to use page numbers instead of the offset, but I thought it is easy as adding just one line to the config array. Like:
Code:
$config['use_page_numbers'] = TRUE;
And I did so, but unfortunately this is not the only change maybe. Because now my pages are wrong. For example, if I have:
Code:
function news($offset = NULL)
{
$limit = 10;
Then the offset is not 10 anymore, but 2 (10 was the previous, now it is page 2)
So the database query is also different.
From my model:
Code:
->limit($limit, $offset)
->get();
Really, this pagination is really hard for me and I can not think about the reason for the mistake. If I manually type the url like this:
/news/10 (the old behavior)
it is Ok...
With a link like:
/news/2
It is now working Sad
What else should I change for that? Please, someone!




Theme © iAndrew 2016 - Forum software by © MyBB