I am using the codeigniter pagination library to page my search results. I am using a limit and an offset to generate the results.
I would like to know how, apart from in the pagination links, echo the number of the page the user is currently viewing.
For example;
You are currently viewing page X out of Y results.
How is this possible??
You could extend the Pagination class (system/libraries/Pagination.php).
Create a file called MY_Pagination.php and put it in application/libraries/
Add this code to your extend pagination class;
Don’t forget to make sure the class extension prefix is set correctly to MY_ in the config.php (about line 109)
Then you can access it in your controller like;
Which you can pass into your view.