Welcome Guest, Not a member yet? Register   Sign In
two paginations on one controller
#1

[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();
// ------------------&gt;
** that's for the INBOX


Code:
// --- pagination ---&gt;
$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();
// ------------------&gt;
** 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!


Messages In This Thread
two paginations on one controller - by El Forum - 03-01-2008, 02:16 PM
two paginations on one controller - by El Forum - 03-02-2008, 03:13 PM
two paginations on one controller - by El Forum - 03-02-2008, 04:47 PM
two paginations on one controller - by El Forum - 03-02-2008, 05:32 PM
two paginations on one controller - by El Forum - 03-02-2008, 06:13 PM
two paginations on one controller - by El Forum - 03-09-2008, 01:50 PM



Theme © iAndrew 2016 - Forum software by © MyBB