Codeigniter pagination

January 15, 2011

CodeIgniter’s Pagination class is very easy to use, and it is 100% customizable, either dynamically or via stored preferences.

Sometimes when we clicked at the pagination number, the numbers still pointed at current page although it shows correct data. This happened because CI will take uri segment 3 as default pagination referrence. To customise CI to read the correct URI segment pagination :

$config['uri_segment'] = 4;

Now CI will recognise uri segment 4 as page referral. Pagination navigator will highlighted to the correct page when you click it now.

Happi pagination :)

Advertisement

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.