Welcome Guest, Not a member yet? Register   Sign In
Reverse Pagging on CI
#1

[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
#2

[eluser]chandrajatnika[/eluser]
help me please.... Sad
#3

[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.
#4

[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...




Theme © iAndrew 2016 - Forum software by © MyBB