Skip to content

Instantly share code, notes, and snippets.

@edomaru
Last active May 4, 2020 07:09
Show Gist options
  • Save edomaru/2d85feac614cd265658f to your computer and use it in GitHub Desktop.
Save edomaru/2d85feac614cd265658f to your computer and use it in GitHub Desktop.
Codeigniter Pagination config to apply bootstrap style
<?php
$config["full_tag_open"] = '<ul class="pagination">';
$config["full_tag_close"] = '</ul>';
$config["first_link"] = "&laquo;";
$config["first_tag_open"] = "<li>";
$config["first_tag_close"] = "</li>";
$config["last_link"] = "&raquo;";
$config["last_tag_open"] = "<li>";
$config["last_tag_close"] = "</li>";
$config['next_link'] = '&gt;';
$config['next_tag_open'] = '<li>';
$config['next_tag_close'] = '<li>';
$config['prev_link'] = '&lt;';
$config['prev_tag_open'] = '<li>';
$config['prev_tag_close'] = '<li>';
$config['cur_tag_open'] = '<li class="active"><a href="#">';
$config['cur_tag_close'] = '</a></li>';
$config['num_tag_open'] = '<li>';
$config['num_tag_close'] = '</li>';
@sir-geronimo
Copy link

Don't work :/

You've to add the class
<li class="page-item"> <a class="page-link" href="#">Next</a> </li>

for every <li>

@hdursun
Copy link

hdursun commented Jun 10, 2018

How can i add
<li class="page-item"> <a class="page-link" href="#">Next</a> </li>
for every li
couldnt do

@marceloagil
Copy link

Congratulations, thank you for sharing!

@hrerror
Copy link

hrerror commented May 4, 2020

Don't work :/

You've to add the class
<li class="page-item"> <a class="page-link" href="#">Next</a> </li>

for every <li>

put <code> <li class="page-item"> <span class=""> <a class="page-link" href="#">Next</a></span> </li></code>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment