I am making a web app with CodeIgniter and Twitter Bootstrap. I found a resource online with a list of $config settings to style the pagination links properly. Is there a way to
You can always simply create a .php
file with a settings array and require_once()
it in your model and return to the pagination initiator. Or it's better to create a model/library that will return all the settings to you.
Model:
',
'full_tag_close' = '',
// ...
);
class Pagiconf extends CI_Model {
public function load() {
$this->load->library('pagination');
$this->pagination->initialize($config);
return $this->pagination->create_links();
}
}
Anywhere you need it:
$this->load->model('pagiconf');
echo $this->pagiconf->load();