php 5.6 - Fixing PHP Codeigniter Pagination button -


i trying modify pagination library in version 3.1 of codeigniter.

this numbering of pagination in use default.

my controller:

$config['num_links'] = 2; 

example:

1234 > >>

4 page button click

1234567 > >>

what want :

12345 > >>

4 page button click

12345 > >>

i trying modify pagination library in version 3.1 of codeigniter.

this numbering of pagination in use default.

what want

as can see in example, page button not static. want have page button fixed , move next range when click on icon. trying in version codeigniter3.1 , not know how modify pagination class. please me.

you can try code , refer https://www.codeigniter.com/userguide3/libraries/pagination.html

$config["base_url"] = base_url().'example'; $config["total_rows"] = $count;//total number of result $config["per_page"] = 5; $config["uri_segment"] = 2; $config['use_page_numbers'] = true;  $this->pagination->initialize($config);  $page_num = $this->uri->segment(2, 0); $offset = ($page_num ? ($page_num - 1) * $config['per_page'] : 0);  $results = $this->product_file->select($config["per_page"], $offset); $links = $this->pagination->create_links(); 

Comments

Popular posts from this blog

php - Vagrant up error - Uncaught Reflection Exception: Class DOMDocument does not exist -

vue.js - Create hooks for automated testing -

Add new key value to json node in java -