CodeIgniter Forums

Full Version: Multiple pagination
You're currently viewing a stripped down version of our content. View the full version with proper formatting.

El Forum

[eluser]Suhas nazir[/eluser]
How to implement multiple pagination in a single page???????

El Forum

[eluser]theprodigy[/eluser]
Have you tried something like:
Code:
$this->load->library('pagination');

//first set
$config['base_url'] = 'http://example.com/index.php/test/page/';
$config['total_rows'] = '200';
$config['per_page'] = '20';

$this->pagination->initialize($config);

$this->data['set_1'] = $this->pagination->create_links();

//second set
$config['base_url'] = 'http://example.com/index.php/test/second_set/';
$config['total_rows'] = '400';
$config['per_page'] = '5';

$this->pagination->initialize($config);

$this->data['set_2'] = $this->pagination->create_links();