CodeIgniter Forums
Few questions on how to use pagination on my site - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forum-20.html)
+--- Forum: Archived General Discussion (https://forum.codeigniter.com/forum-21.html)
+--- Thread: Few questions on how to use pagination on my site (/thread-4702.html)



Few questions on how to use pagination on my site - El Forum - 12-11-2007

[eluser]zzet[/eluser]
Hallo,

I'm new to CodeIgniter and I'm building my first project with it.
Now, I have to generate a 'special' pagination and I'm not sure if I can use the pagination class for my problem.

Here we go...

I'm building a picture-gallery which contains several albums.

1. Now I want to display a navigation (pagination) which shows a link for "previous", the actual album name, the next album name and a link "next". I don't want to display numbers but the names of the albums. Possible?

2. Each album contains several pictures and I don't want to show all of the pictures of one album on one page. I want to limit it on 20 pictures per page. I'm sure that I can use the pagination class of CI to manage this, but how can I combine this "picture-pagination" with the "album-pagination" described in 1.

In short, I want to have a gallery-navigation which looks something like:

< 1 2 3 4 5 > (for the pictures)
last - album 1 - album 2 - next (for the albums)

How can I do that? Can anyone please help me with this?


Few questions on how to use pagination on my site - El Forum - 12-31-2007

[eluser]Sawariya[/eluser]
yes you can do.. You have to change some code in codeigniter pagination library as per your requirement...
I have done it successfully..


Few questions on how to use pagination on my site - El Forum - 12-31-2007

[eluser]Sawariya[/eluser]
var $first_link = '&lsaquo; First';
var $next_link = ' Next';
var $prev_link = 'Previous ';
var $last_link = 'Last &rsaquo;';