CodeIgniter Forums
Pagination Question - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: CodeIgniter Archived (from EllisLab) (https://forum.codeigniter.com/forum-20.html)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forum-23.html)
+--- Thread: Pagination Question (/thread-57481.html)



Pagination Question - El Forum - 03-18-2013

[eluser]ede196620[/eluser]
Hi to everyone whom reads this post i was jest wondering about the pagination in codeigniter is it possible to play around with it so instead of numbers it would display something else ?


Pagination Question - El Forum - 03-18-2013

[eluser]TheFuzzy0ne[/eluser]
Yes, you can extend it, or implement your own version, as outlined [url="http://ellislab.com/codeigniter/user-guide/general/creating_libraries.html"]here[/url]


Pagination Question - El Forum - 03-18-2013

[eluser]ede196620[/eluser]
Is it OK to edit the main pagination library or is it a no no ?


Pagination Question - El Forum - 03-18-2013

[eluser]davidMC1982[/eluser]
If you want to alter any of the main libraries you do this by extending them.

Create a file in your application/libraries folder called MY_Pagination.php and create a class MY_Pagination that extends CI_Pagination.

Examine the Pagination.php file in system/libraries. Your MY_Pagination class will inherit all the methods and properties found here. Any method/properties you define in your MY_Pagination class will override those in the CI_Pagination class.