Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //Controller
- $limit = 15;
- $offset=$this->uri->segment(4);
- if($offset=='')
- $offset=0; //pagination class needs to know what page we are on
- $config['total_rows'] = $this->Information->CountTopRated($type); //do a quick db lookup to see how many records we are dealing with
- $config['base_url'] = site_url('/catagory/androidTopRated/'.$type.'/'); //our URI segments are built from the site address, posts controller and the index method.
- $config['per_page'] = $limit;//using our limit variable to set the number of records to display
- $data['tr'] = $this->Information->topRated($type,$limit,$offset);//chaining active record methods from our MY_Model to limit and get all records
- $config['uri_segment'] = 4;
- $kk = $this->pagination->frontpaginationstyle();
- $config = array_merge($kk,$config);
- $this->pagination->initialize($config);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement