I have seen a number of old posts around this topic on stack overflow but none of them seem to give any clarity. What I have understood by going through them is that codeigniter doesnt support multiple paginations through its class and that you have to write your own class.
I wonder if that is the case. In case any body here has an idea about how to do it please let me know. I have three lists which I'm passing into the view. However when I paginate all of them, all the three lists response to same page offset. Is Ajax_pagination the way out?
Please suggest how to do this.
UPDATE: Here is my code and what I'm trying to do.This is a view file. I have two lists 1. org_list 2. Ind_list I'm trying to pass to these two lists in tow view files (organization_listing, individual_listing) both of which are loaded in this view file and therefore appear on the same page. Now I can paginate one list but when I paginate the second file they both respond to same uri offset.
I'm generating the pagination links in the (organization_listing, individual_listing) view files.
<?php
$config['base_url'] = 'http://localhost/socialinew/user_registration/index.php/members_area/view_members_area';
$config['total_rows'] = count($org_list);
$config['per_page'] = 4;
$config['num_links'] = 20;
$config['full_tag_open'] = '<div id="pagination3">';
$config['full_tag_close'] = '</div>';
$this->pagination->initialize($config);
for($i=$this->uri->segment(3)+0;$i<(($this->uri->segment(3)+$config['per_page']));$i++)
{
if(isset($org_list[$i]))
{$temp_org[$i]=$org_list[$i];
}
}
$tmp_org['org_list']=$temp_org;
$this->load->view('organization/organization_listing',$tmp_org);
$org_config['base_url'] = 'http://localhost/socialinew/user_registration/index.php/members_area/view_members_area/';
$org_config['total_rows'] = count($ind_list);
$org_config['per_page'] = 5;
$org_config['num_links'] = 20;
$org_config['full_tag_open'] = '<div id="pagination2">';
$org_config['full_tag_close'] = '</div>';
$this->pagination->initialize($org_config);
for($i=$this->uri->segment(4)+0;$i<(($this->uri->segment(4)+$config['per_page']));$i++)
{
if(isset($ind_list[$i]))
{$temp_ind[$i]=$ind_list[$i];
}
}
$tmp_ind['ind_list']= $temp_ind;
$this->load->view('individual_listing',$tmp_ind);?>