简体   繁体   中英

how to add pagination link in codeigniter

I am using codeigniter framework, but usual, I have done pagination under codeigniter but now I am facing some issue, that I could not click the link because of baseurl, I have siblink that is (base_url ().'franchise/loginconfirm#parentHorizontalTab3/') parentHorizontalTab3 is a siblink, when I use this Sublink I could not click pagination link its not working, how can i create pagination with is url? please help me. My code is below

    $config['base_url']         = base_url().'franchise/loginconfirm#parentHorizontalTab3/';
    $config['total_rows']       = $this->ui_franchise_model->sel_adslist_product_count();   
    $offset                 = $this->uri->segment(3,0);
    $config['suffix']          = '#' . http_build_query($_GET, '', "&");
    $config['per_page']         = 4;
    $config['uri_segment']  = '3';
    $config['num_links']        = 3;        
    $this->pagination->initialize($config);
    $data['page_links']     = $this->pagination->create_links(); 

Apply $config['uri_segment'] = 3; instead of $config['uri_segment'] = '3';

Hope it will work

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM