Pagination Problem |
[eluser]David.Wu[/eluser]
$this->load->library('pagination'); $config['base_url'] = base_url().'index/pager/'; $config['total_rows'] = 200; $config['per_page'] = 5; $this->pagination->initialize($config); echo $this->pagination->create_links(); output 1 2 3 > Last › shouldn't it be 1 2 3 4 5 > Last > ? when click page 2 < 1 2 3 4 > Last › when click page 3 < 1 2 3 4 5 > Last › how to keep it at least 5 page at beginning if there is really over 5 pages can I customize the minimum amount of pages? such as < 1 2 3 4 5 6 > Last ›
[eluser]jochemvn[/eluser]
set the following config var $config['num_links'] = 3; this doesn't mean you'll get 3 links. This means you'll get UP TO 3 links on the left of your current page and UP TO 3 links on the right of the current page. Say you're on the first page: "1 2 3 4 > Last" Say you're on page 12: "First < 9 10 11 12 13 14 15 > Last" Say you're on the last page: "First < 66 67 68 69"
[eluser]David.Wu[/eluser]
http://www.mobile01.com/topicdetail.php?...657170&p=1 I think it should be like this, if the numbers limit of the page navigation is 5, and the data is over 5 pages. when you at first page 1 2 3 4 5 page 2 1 2 3 4 5 page 3 1 2 3 4 5 page 4 2 3 4 5 6 it should always keep 5 numbers on the page, how come I can't get to page 5 at first page when I really have it, doesn't it weired?
[eluser]Clooner[/eluser]
[quote author="David.Wu" date="1281520850"]http://www.mobile01.com/topicdetail.php?f=240&t=1657170&p=1 I think it should be like this, if the numbers limit of the page navigation is 5, and the data is over 5 pages. when you at first page 1 2 3 4 5 page 2 1 2 3 4 5 page 3 1 2 3 4 5 page 4 2 3 4 5 6 it should always keep 5 numbers on the page, how come I can't get to page 5 at first page when I really have it, doesn't it weired?[/quote] As Jochem wrote before and what it also says in the manual Code: $config[‘num_links’] = 5 // phpbb style |
Welcome Guest, Not a member yet? Register Sign In |