Codeigniter Bootstrap Pagination

后端 未结 5 1855
轻奢々
轻奢々 2021-02-06 15:30

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

5条回答
  •  情书的邮戳
    2021-02-06 16:23

    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();
    

提交回复
热议问题