function contact_type() { $data['page_name'] = '<b>Training Contact Type</b>'; $data['msg'] = ''; $this->load->library('pagination'); $contact = new Training_contact_type(); $config['base_url'] = base_url() . 'training_manage/contact_type'; $config['total_rows'] = $contact->get()->count(); $config['per_page'] = '15'; $config['full_tag_open'] = '<p>'; $config['full_tag_close'] = '</p>'; $this->pagination->initialize($config); // How many related records we want to limit ourselves to $limit = $config['per_page']; // Set the offset for our paging $offset = $this->uri->segment(3); $contact->order_by('contact_type'); $data['rows'] = $contact->get($limit, $offset); $data['page'] = $this->uri->segment(3); $data['main_content'] = 'contact_type'; return View::make('includes/template', $data); }