Welcome Guest, Not a member yet? Register   Sign In
Pagination: Previous link on the second page shall not display page number in link
#1

[eluser]indapublic[/eluser]
Hello, everyone. I have a trouble with Codeigniter Pagination and can not resolve it. My config (only part):
Code:
'use_page_numbers' => TRUE,
'first_link' => FALSE,
'first_tag_open' => FALSE,
'first_tag_close' => FALSE,
'last_link' => FALSE,
'last_tag_open' => FALSE,
'last_tag_close' => FALSE,
'next_link' => 'next',
'next_tag_open' => '<li>',
'next_tag_close' => '</li>',
'prev_link' => 'previous',
'prev_tag_open' => '<li>',
'prev_tag_close' => '</li>',
'cur_tag_open' => '<li class="active">',
'cur_tag_close' => '</li>',
'num_tag_open' => '<li>',
'num_tag_close' => '</li>'

When I on the third page (list/3, for example), my previous link is list/2 (is correct). When I on the second page (list/2), my first link is list (is correct), but previous link is list/1

How I can change it behaviour? I can not find anything about it in manual
#2

[eluser]InsiteFX[/eluser]
You need to show your pagination code the config is not your problem.
#3

[eluser]indapublic[/eluser]
Code:
private function __pagination($config) {
        $pagination_config = array(
            'base_url' => $myurl,
            'uri_segment' => $this->uri->total_segments(),
            'total_rows' => $config['total_rows'],
            'per_page' => $config['per_page'],
            'use_page_numbers' => TRUE,
            'page_query_string' => FALSE,
            'num_links' => 2,
            'query_string_segment' => 'page',
            'display_pages' => TRUE,
            'full_tag_open' => '<span class="label">Pages:</span><ul>',
            'full_tag_close' => '</ul>',
            'first_link' => FALSE,
            'first_tag_open' => FALSE,
            'first_tag_close' => FALSE,
            'last_link' => FALSE,
            'last_tag_open' => FALSE,
            'last_tag_close' => FALSE,
            'next_link' => '<span>next</span>&nbsp;→',
            'next_tag_open' => '<li class="arrow">',
            'next_tag_close' => '</li>',
            'prev_link' => '<span>←&nbsp;previous</span>',
            'prev_tag_open' => '<li class="arrow">',
            'prev_tag_close' => '</li>',
            'cur_tag_open' => '<li class="active"><span>',
            'cur_tag_close' => '</span></li>',
            'num_tag_open' => '<li>',
            'num_tag_close' => '</li>'
        );
        $this->load->library('pagination');
        $this->pagination->initialize($pagination_config);
        return $this->pagination->create_links();
    }
#4

[eluser]InsiteFX[/eluser]
Watch these videos:

http://www.weblee.co.uk/2009/06/06/codei...on-part-1/




Theme © iAndrew 2016 - Forum software by © MyBB