Welcome Guest, Not a member yet? Register   Sign In
Pagination and passing argument to the function
#1

[eluser]nahalem[/eluser]
Hay,

I have a seroius problem while creating pagination on page. Pagination is create well, link are showed but I'm passing one parameter to the function that shows my categories menu on the page. Thing is when I'm clicking second link of my pagination it doesn't work properly. Only first pagination link is active and it showing only first 4 products. Can you help me resolve that problem pls? Code below:

controller function:
Code:
public function polimaxCategories($arg)
{
  //$config['base_url'] = site_url('polimax/polimaxCategories');
  $config['base_url'] = site_url('polimax/polimaxCategories/'.$arg);
  //$config['base_url'] = base_url().'polimax/polimaxCategories/'.$arg.'/';
  $config['total_rows'] = $this->db->get('products')->num_rows();
  $config['per_page'] = 4;
  $config['num_links'] = 10;
        $config['uri_segment'] = 3;
  $config['full_tag_open'] = '<div id="pagination">';
  $config['full_tag_close'] = '</div>';
  
  $this->pagination->initialize($config);
              
  $this->load->model('cart_model');
        //
  $data['products'] = $this->cart_model->retrieveProductsOnPage($arg,$config['per_page'], $config['uri_segment']);
  
  $this->load->model('categories_model');
  $data['cat'] = $this->categories_model->retrieveActiveCategories();
  $data['content_cat'] = 'static/menu_categories';
  
  $data['content'] = 'cart/products';
  $this->load->view('polimax',$data);  
  
}



Messages In This Thread
Pagination and passing argument to the function - by El Forum - 04-10-2012, 06:27 PM
Pagination and passing argument to the function - by El Forum - 04-10-2012, 07:46 PM
Pagination and passing argument to the function - by El Forum - 04-10-2012, 09:38 PM
Pagination and passing argument to the function - by El Forum - 04-10-2012, 10:43 PM
Pagination and passing argument to the function - by El Forum - 04-10-2012, 11:21 PM
Pagination and passing argument to the function - by El Forum - 04-11-2012, 06:03 PM



Theme © iAndrew 2016 - Forum software by © MyBB