Welcome Guest, Not a member yet? Register   Sign In
pagination class - smth between next n prev links
#1
Exclamation 

hi men! the default create_links() method of the pagination class make links be shown next to each other, like this:
   
is there any way to make it look like this:
   
or i have to hack the create_links() method? thanks in advance
Reply
#2

Show your code.
Practical guide to IgnitedCMS - Book coming soon, www.ignitedcms.com
Reply
#3

(This post was last modified: 08-16-2015, 10:38 AM by Diederik.)

There is absolutely no reason to 'hack' a file in the system directory. You will regret it when you need to update CodeIgniter to a newer version.

You should instead create your own library which extends the pagination library and add your own functions to it.

Or you could look at our problem from a different angle. You could just place the pagination output both above and below the list of your comments and use CSS to hide the next button in the top and hide the previous link in at the bottom of the page.
Reply
#4

Or you can modify with javascript or jQuery to hide 'prev' link and/or move it at the bottom. Maybe pagination return an array for the future.
My bad, my english 10:32 AM
Reply
#5

(This post was last modified: 08-17-2015, 05:22 AM by Tecvid.)

(08-16-2015, 09:47 AM)iamthwee Wrote: Show your code.

look at the docs of the pagination class Smile that's my source code)



(08-16-2015, 10:37 AM)Diederik Wrote: You should instead create your own library which extends the pagination library and add your own functions to it.

i think this variant is the best if there is no native way to do it, thanks a lot for ur advice! Smile



(08-16-2015, 02:34 PM)ardhie1032 Wrote: Or you can modify with javascript or jQuery to hide 'prev' link and/or move it at the bottom. Maybe pagination return an array for the future.

i cant use this way, cuz next button shown only if there is no javascript or it is turned off, for the users with javascript there is just prev comments buttons n comments load via ajax, anyway thanks for the advice Smile
Reply




Theme © iAndrew 2016 - Forum software by © MyBB