CodeIgniter Forums

Full Version: Few questions on how to use pagination on my site
You're currently viewing a stripped down version of our content. View the full version with proper formatting.

El Forum

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

El Forum

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

El Forum

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