Pagination

edited May 2011 in Installation
I wasn't really able to find any documentation on pagination for fuel cms. I am following the documentation that codeigniter has available and everything works perfect, but when I click on the next page. I get an error.

An Error Was Encountered
The configuration file development/fuel.php and fuel.php do not exist.

controller:

// load pagination class
$this->load->library('pagination');
$config['base_url'] = base_url().'tour/';
$config['total_rows'] = $this->db->count_all('shows');
$config['per_page'] = '5';

$this->pagination->initialize($config);

//load the model and get results
$this->load->model('shows_model');
$vars['rows'] = $this->shows_model->index($config['per_page'],$this->uri->segment(3));


// use Fuel_page to render so it will grab all opt-in variables and do any necessary parsing
$page_init = array('location' => 'tour');
$this->load->module_library(FUEL_FOLDER, 'fuel_page', $page_init);
$this->fuel_page->add_variables($vars);
$this->fuel_page->render();


view:

<?php echo $this->pagination->create_links(); ?>

Comments

Sign In or Register to comment.