[eluser]DumpProgrammer[/eluser]
I have put everything in the controller but I cannot the paginating to work here is how my controller is looking like
Code:
function index()
{
$data['posts'] = array(); //we will replace soon!
$data['cats'] = $this->MCats->getTopCategories(); //we will replace soon!
$data['title'] = "Shout-Africa";
$data['main'] = 'public_home';
$data['featured'] = $this->MPosts->getAllFeaturedPosts();
$data['post'] = $this->MPosts->getAllActivePosts();
$this->load->vars($data);
$this->load->view('newheader');
$this->load->view('newnav');
$this->load->view('newfeatured');
// set pagination parameters
$this->load->library('pagination');
$config['base_url']=base_url();
$config['total_rows'] = $this->db->count_all('posts');
$config['per_page'] = '4';
$config['full_tag_open']='<div class="box">';
$config['full_tag_close']='</div>';
$this->pagination->initialize($config);
// create pagination links
$data['links']=$this->pagination->create_links();
// load 'blogger_view' view
$this->load->view('newcontent',$data);
$this->load->view('footer');
}