Welcome Guest, Not a member yet? Register   Sign In
SOLVED (isn't a bug) troubles with Pagination with one per page or a bug?
#1

[eluser]jozeunico[/eluser]
Somebody knows why if I make the "create_links" two times at least, the active link increase in one (one foreach "<?php echo $this->pagination->create_links(); ?>" that I have)

I even got this example http://godbit.com/files/ci_pagination_tut.zip from http://godbit.com/article/pagination-with-code-igniter and set [per_page]=1 and it happend the same thing

Well just if somebody has an example with one item per page and the result it's bigger than 10 items, and it works, please help.
#2

[eluser]fesweb[/eluser]
If you want pagination at the top and bottom of results, you need to write the create_links output to a variable
Code:
// in the controller...
$data['paging_links'] = $this->pagination->create_links();

$this->load->view('my_results', $data);

// in my_results view
echo $paging_links;

// show records here

echo $paging_links;
Is that what you're looking for?
#3

[eluser]jozeunico[/eluser]
in fact,yes that it's what I was looking for, yeah !!!
THANK YOU SO MUCH,

and could you explain me why it's necesary to do that? Because for example When I did click in the second or greater link everything goes fine, except the first, whatever thank you again.
#4

[eluser]fesweb[/eluser]
I don't know why it doesn't work the other way, but think of it like this: you should only run the create_links function once, because you avoid processing time, making your page that much faster.




Theme © iAndrew 2016 - Forum software by © MyBB