CodeIgniter Forums

Full Version: How to use the pagination with view parser?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello there!
I am building a view with pagination with view parser, the problem is how I spend the value of pager to build my links? since it is an object and in view parser it is not possible to use them
$data = [
    'rows' => $this->model->paginate(2),
    'pager' => $this->model->pager
At the bottom of the UG page (, a pagination objet will have `links()` that you can inject into your view at the proper place.

I thought there was something inside the Model class as well, but it isn't jumping out at me.
Not having idea how to do it... If you find the solution please tell me too.