I use cakephp 3.x paginator and I have a request from customer.
Example:
- My paginate bar, now it's stand at #1.
<< | < | **1** 2 3 4 5 6 7 8 9 | > | >>
- When I click to ">>" the bar will show 10-19 and stand at #10
<< | < | **10** 11 12 13 14 15 16 17 18 19 | > | >>
- Click to ">>" again, it will show 20-29 and stand at #20
<< | < | **20** 21 22 23 24 25 26 27 28 29 | > | >>
- Same with "<<", will back to 10-19 and 1-9.
The ">" and "<" just go next page and back to prev page.
So my question is:
- How can I make the ">>" and "<<" button with cakephp pagination helper?
My code in view.ctp is
<?php
echo $this->Paginator->first(<<);
echo $this->Paginator->prev('<');
echo $this->Paginator->numbers();
echo $this->Paginator->next('>');
echo $this->Paginator->last(>>);
?>
<<
and>>
...first('<<')
,last('>>')
– Poonamecho $this->Paginator->first(<<);
with thisecho $this->Paginator->first('<<');
and same with thelast
– Poonamfirst()
andlast()
stands for first and last page simultaneously – Poonam