Welcome Guest, Not a member yet? Register   Sign In
Using Pagination but with NO table ?
#1

[eluser]chefnelone[/eluser]
Hello

I have this code to do pagination using tables.
I'd like to know how to do it using DIVs instead of TABLE

How can I grab the sent data from the view?

controller: site.php
Code:
function index()
    {
        $this->load->library('pagination');
        $this->load->library('table');
        
    
        $config['base_url'] = 'http://localhost:8888/ci/index.php/site/index';
        $config['total_rows'] = $this->db->get('data')->num_rows();
        $config['per_page'] = 10;
        $config['num_links'] = 20;
        
        $this->pagination->initialize($config);
        
        $data['records'] = $this->db->get('data', $config['per_page'], $this->uri->segment(3));
        
        $this->load->view('site_view', $data);
        
    }

VIEW: views/site_view.php

Code:
<div>
        &lt;?php echo $this->table->generate($records); ?&gt;
        &lt;?php echo $this->pagination->create_links(); ?&gt;
</div>


Messages In This Thread
Using Pagination but with NO table ? - by El Forum - 07-30-2010, 06:00 AM
Using Pagination but with NO table ? - by El Forum - 07-30-2010, 08:35 AM
Using Pagination but with NO table ? - by El Forum - 07-30-2010, 08:41 AM
Using Pagination but with NO table ? - by El Forum - 07-30-2010, 08:56 AM
Using Pagination but with NO table ? - by El Forum - 07-30-2010, 10:33 AM



Theme © iAndrew 2016 - Forum software by © MyBB