URL for first number page in codeigniter pagination

后端 未结 4 873
粉色の甜心
粉色の甜心 2021-01-16 12:38

How can put url for link number 1 like other links, in codeigniter pagination, when start(refresh) page

« First < 1 2

相关标签:
4条回答
  • 2021-01-16 12:44

    CodeIgniter allows you to customize the First Link .

    You can change the opening and closing tags of the First Link .

    $config['first_tag_open'] = '<div>';
    $config['first_tag_close'] = '</div>';
    

    So just find out what the other links use by default and use them as your opening and closing tags ..

    0 讨论(0)
  • 2021-01-16 12:55
        $config['cur_tag_open']='<li><a href="[removed]void(0);" class="page_active">';
        $config['cur_tag_close']='</a></li>';
    
    0 讨论(0)
  • 2021-01-16 12:56

    Wow this is an amazingly difficult question to read - But I think the general idea is you want to customize the look / functionality of your CI pagination.

    Since I barely understand what you're asking, here is the obvious thing to do:

    http://codeigniter.com/user_guide/libraries/pagination.html

    That link goes over the pagination class clearly.

    I may be able to clarify more if you clean up the question a bit.

    0 讨论(0)
  • 2021-01-16 12:58

    It's in the config for pagination. From the docs ( http://codeigniter.com/user_guide/libraries/pagination.html ):

    //Customizing the "Current Page" Link
    
    $config['cur_tag_open'] = '<a href="'.base_url().$this->uri->uri_string().'">';
    $config['cur_tag_close'] = '</a>';
    

    You can change the values of these to <span> or whatever else you choose.

    0 讨论(0)
提交回复
热议问题