Welcome Guest, Not a member yet? Register   Sign In
[Solved] Bootstrap & Codeigniter Pagination
#1

(This post was last modified: 10-14-2016, 02:38 PM by wolfgang1983.)

Hello.

When I am on my first pagination


Code:
1 2 >>



My code hides the < before 1

I would like to be able to keep both showing  <<   >> visible when I am going through the pagination

So would look like



Code:
<< 1 2 >>


I am unsure how to do so on here any ideas?


PHP Code:
$url '';

if (
$this->input->get('sort')) {
    $url .= '&sort=' $this->input->get('sort');
}

if (
$this->input->get('order')) {
    $url .= '&order=' $this->input->get('order');
}

$config['base_url'] = base_url('forum/?fid=' $this->input->get('fid') . $url);
$config['total_rows'] = $this->thread_model->total_threads($this->input->get('fid'));
$config['per_page'] = $this->config->item('config_limit_admin');
$config['page_query_string'] = TRUE;
        
$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'] = '&raquo;';
$config['next_tag_open'] = '<li>';
$config['next_tag_close'] = '<li>';
$config['prev_link'] = '&laquo;';
$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>';

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

$data['pagination'] = $this->pagination->create_links(); 
There's only one rule - please don't tell anyone to go and read the manual.  Sometimes the manual just SUCKS!
Reply
#2

Have you tried these Solutions? http://stackoverflow.com/questions/16027...tion-class
Reply
#3

(10-11-2016, 07:32 PM)suhindra Wrote: Have you tried these Solutions? http://stackoverflow.com/questions/16027...tion-class

Tried the pagination it was not working on CI 3 must be for CI2
There's only one rule - please don't tell anyone to go and read the manual.  Sometimes the manual just SUCKS!
Reply
#4

The solution is now found here

http://stackoverflow.com/questions/39975...9#40049149
There's only one rule - please don't tell anyone to go and read the manual.  Sometimes the manual just SUCKS!
Reply




Theme © iAndrew 2016 - Forum software by © MyBB