[eluser]nikhil_22[/eluser]
This is my function
function start_post(){
$this->load->library('pagination');
$this->load->library('table');
$this->table->set_heading('Category name','Category Description');
$config['base_url']='http://mysite/index.php/forum/start_post';
$config['total_rows']=$this->db->get('categories')->num_rows();//total no of rows from data table
$config['per_page'] =7; //how many per page
$config['num_links']=20;//no of links
$config['full_tag_open']= '<div id="pagination"> ' ;
$config['full_tag_close']='</div>' ;
$this->pagination->initialize($config);
//pass the config items to initialize
$data['records']=$this->db->get('categories',$config['per_page'],$this->uri->segment(3));
//second argument is the limit per page.The third argument is the offset//
$this->load->view('new_post_form',$data);
}
And this code is my view
<?php echo $this->table->generate($records) ?>
<?php echo $this->pagination->create_links();?>
I want to include anchor tags inside my table data so that each data entry in the table is a link.