![]() |
Reverse Pagging on CI - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived General Discussion (https://forum.codeigniter.com/forumdisplay.php?fid=21) +--- Thread: Reverse Pagging on CI (/showthread.php?tid=19723) |
Reverse Pagging on CI - El Forum - 06-16-2009 [eluser]chandrajatnika[/eluser] Help me please, I want to show a reverse pagging on my aplication normal pagging... at first page showed 1 2 3 > Last at last page showed First < 64 63 65 reverse pagging... at first page showed First < 64 63 65 at last page showed 1 2 3 > Last how to create it? is I have to modify Pagination.php on CI system? or create another library? please send me an example.... Thank you very much Reverse Pagging on CI - El Forum - 06-17-2009 [eluser]chandrajatnika[/eluser] help me please.... ![]() Reverse Pagging on CI - El Forum - 06-17-2009 [eluser]Flemming[/eluser] I can't tell you the code you need, but they way to proceed is to copy CI Pagination.php into application/libraries and rename it to 'MY_Pagination.php' rewrite this file to suit your needs. You don't need to do anything to load it as it will automagically extend the CI Pagination class. Reverse Pagging on CI - El Forum - 06-17-2009 [eluser]Dam1an[/eluser] Just had a quick look at the pagination class, looks like the part you need to change starts at line 200 That's the for loop which renders the links, so if you just flip the condition of the for loop and make it decrement instead of increment, it should (hopefully) give you what you want At least that should be a starting point, you will probably need to tweak something else somewhere... |