Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save truongan/b302641169e98f8a88b62a9f7d3582ee to your computer and use it in GitHub Desktop.
Save truongan/b302641169e98f8a88b62a9f7d3582ee to your computer and use it in GitHub Desktop.
$this->pagination_config['full_tag_open'] = '<nav><ul class="pagination justify-content-center">';
$this->pagination_config['full_tag_close'] = '</ul></nav>';
$this->pagination_config['num_tag_open'] = '<li class="page-item">';
$this->pagination_config['num_tag_close'] = '</li>';
$this->pagination_config['cur_tag_open'] = '<li class="page-item active"><span class="page-link">';
$this->pagination_config['cur_tag_close'] = '<span class="sr-only">(current)</span></span></li>';
$this->pagination_config['next_tag_open'] = '<li class="page-item"><a ';
$this->pagination_config['next_tagl_close'] = '<span aria-hidden="true">&raquo;</span></li>';
$this->pagination_config['prev_tag_open'] = '<li class="page-item">';
$this->pagination_config['prev_tagl_close'] = '</li>';
$this->pagination_config['first_tag_open'] = '<li class="page-item">';
$this->pagination_config['first_tagl_close'] = '</li>';
$this->pagination_config['last_tag_open'] = '<li class="page-item">';
$this->pagination_config['last_tagl_close'] = '</li>';
///The following javascript has to be added to add the necessary page-link class to all those <a> tag
<script type="text/javascript">$("nav > ul.pagination a").addClass("page-link");</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment