This no longer works... Because I'm no longer able to pass variables to my own pager PHP page in CI4.
I was also using variables to my view as well:
PHP Code:
'currentPage' => $myModel->pager->getCurrentPage('group1'), // The current page number
'totalPages' => $myModel->pager->getPageCount('group1'), // The total page count
With the latest CI4 version, this will give you an error message when trying to use this in your pager PHP code:
Quote:Undefined variable $currentPage
To answer my own question. It's solved by calling the methods in the template....
PHP Code:
<button type="button" class="btn" disabled><?= 'Pagina ' . $pager->getCurrentPageNumber(). ' of the ' . $pager->getPageCount(); ?></button>
Keep in mind that you notice also the get methods are changed to getCurrentPageNumber(). And I no longer supply the group.