Welcome Guest, Not a member yet? Register   Sign In
Pagination when $config['per_page'] = 1
#1

[eluser]Cesar Kohl[/eluser]
Hi,

I use CI for more than 1 year now and I got this problem with Pagination library.

I want to make a book webpage, so page 1, 2, 3..

Here's the simple config, recommended in the User Guide, for pagination:

Code:
$this->load->library('pagination');

$config['base_url'] = base_url().'page/';
$config['total_rows']     = 10; //total pages
$config['per_page']     = 1;
$this->pagination->initialize($config);

echo $this->pagination->create_links();

So, the result is this:

1 2 3 > Last ›

BUT, the link of these anchors are:
Link 1: 'page/1'
Link 2: 'page/1' Must be two! OH NO
Link 3: 'page/2' Must be three! OH NO
...

Please, how can I fix it?


Messages In This Thread
Pagination when $config['per_page'] = 1 - by El Forum - 06-25-2011, 02:50 PM
Pagination when $config['per_page'] = 1 - by El Forum - 06-26-2011, 12:53 PM
Pagination when $config['per_page'] = 1 - by El Forum - 06-26-2011, 01:36 PM
Pagination when $config['per_page'] = 1 - by El Forum - 06-27-2011, 10:21 AM
Pagination when $config['per_page'] = 1 - by El Forum - 06-27-2011, 02:08 PM
Pagination when $config['per_page'] = 1 - by El Forum - 06-27-2011, 04:26 PM
Pagination when $config['per_page'] = 1 - by El Forum - 06-27-2011, 10:11 PM
Pagination when $config['per_page'] = 1 - by El Forum - 06-28-2011, 05:14 AM



Theme © iAndrew 2016 - Forum software by © MyBB