public function showBlog() { //Get the page that we are on $page = Input::get('page') ? Input::get('page') : 1; $records_per_page = 10; //Get the artivles that we are going to display $data['articles'] = Tools::getBlogPosts($page, $records_per_page); // instantiate the pagination object $pagination = new Paging(); // the number of total records is the number of records in the array $pagination->records(count($data['articles'])); //$pagination->records(500); // records per page $pagination->records_per_page($records_per_page); $data['pagination'] = $pagination; //Create the view $this->layout->content = View::make('blog.blog', $data); $this->layout->header = View::make('includes.header'); $headerData = array('title' => isset($this->metaData['blog_title']) ? $this->metaData['blog_title'] : null, 'description' => isset($this->metaData['blog_desc']) ? $this->metaData['blog_desc'] : null); $this->layout->header = View::make('includes.header', $headerData); }