Reputation: 17900
I need the page number but cannot seem to find any documentation towards it. How do I output in my CakePHP view the current page I am on (using PaginatorHelper)?
Thank you!
Upvotes: 2
Views: 6305
Reputation: 11
After extracted $this->request via pr(), I got this solution
$currentPage = $this->request->paging['Model']['page']
and to put it to view $this->set('currentPage', $currentPage)
Upvotes: 1
Reputation: 731
$this->Paginator->current($model = null)
http://api.cakephp.org/class/paginator-helper#method-PaginatorHelpercurrent
Upvotes: 4