Welcome Guest, Not a member yet? Register   Sign In
pagination problem
#1

[eluser]dimis[/eluser]
I use pagination with 1.6.3 version
The code
Code:
$this->load->library('pagination');
       $this->data['confirndelete'] =onmydelete();
        $this->data['prototype'] = $this->config->item('prototype');
        $counter=$this->mncard->count();
        $per_page=20;
        $config['base_url'] = $this->data['base']."index.php/manager/cart/index";
        $config['total_rows'] = $counter;
        $config['per_page'] = $per_page;

        $this->pagination->initialize($config);
        
        $this->data['pagination']= $this->pagination->create_links();
        $this->data['carts']=$this->mncard->carts($per_page,$index);
        $this->data['cat'] ="Αγορές";
        $this->data['menutext'] = 'manager/cards';
        $this->load->view("manager/main",$this->data);
My problem is that I wrote
Code:
echo $pagination;
at view
and there is no pagination links (the case is that must be pagination links.
What is wrong?
#2

[eluser]Senthilguru[/eluser]
Hi dude,

try this code ....

Code:
$this->load->library('pagination');

$config['base_url'] = $this->data['base']."index.php/manager/cart/index";
$config['total_rows'] = 200;
$config['per_page'] = 20;

$this->pagination->initialize($config);
        
$this->data['pagination']= $this->pagination->create_links();
echo $this->data['pagination'];
        
exit;

this one is showing the pagination links...i hope the problem is here

Code:
$counter=$this->mncard->count();
$config['total_rows'] = $counter;

pls check this....i hope it will work..

Cheers
senthilguru.e
cogzideltemplates.com




Theme © iAndrew 2016 - Forum software by © MyBB