[eluser]A.M.F[/eluser]
hello,
i want to make to pagnation for two controllers.
i am showing a list of "sent items" and "recieved items" so for that i am making a pagination.
this is how my pagination settings looks like:
Code:
// --- pagination --->
$start_at = ($this->uri->segment(4)) ? $this->uri->segment(4) : 0;
if ($this->uri->segment(3) == 'out') $start_at = 0;
$config['base_url'] = site_url('profile/messages/in');
// --- config: -------
$config['total_rows'] = $query->num_rows();
$config['uri_segment'] = 4;
$config['per_page'] = 1;
$config['full_tag_open'] = '<p style="padding: 3px 10px;">';
$config['full_tag_close'] = '</p>';
// --- get totals: ---
$this->pagination->initialize($config);
$data['pagination'] = $this->pagination->create_links();
// ------------------>
** that's for the INBOX
Code:
// --- pagination --->
$start_at = ($this->uri->segment(4)) ? $this->uri->segment(4) : 0;
if ($this->uri->segment(3) == 'in') $start_at = 0;
$config['base_url'] = site_url('profile/messages/out');
// --- config: -------
$config['total_rows'] = $query->num_rows();
$config['uri_segment'] = 4;
$config['per_page'] = 1;
$config['full_tag_open'] = '<p style="padding: 3px 10px;">';
$config['full_tag_close'] = '</p>';
// --- get totals: ---
$this->pagination->initialize($config);
$data['out_pagination'] = $this->pagination->create_links();
// ------------------>
** that's for the OUTBOX
the problam is inside the
create_links() function.
when i click on a page in the INBOX, than the out_pagination also changes to this page and shows it.
why?
- if u didn't understand my explanation i will try to display it better
thank u!