Welcome Guest, Not a member yet? Register   Sign In
Pagination produces the wrong page number
#1

[eluser]gevans[/eluser]
I've been trying to sort out this issue I'm having with the pagination class, but it's the first time I've used it and I'm stumped.

Code:
$this->load->library('pagination');
    $config['base_url'] = base_url().'search/agents/'.$this->uri->segment(3).'/'.$this->uri->segment(4);
    $config['total_rows'] = $all_agents;// 4
    $config['per_page'] = $limit;// 3
    $config['uri_segment']  = 5;

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

The html outputted is

Code:
&nbsp;<strong>1</strong>&nbsp;<a href="http://localhost/site/search/agents/france/alsace/3">2</a>&nbsp;<a href="http://localhost/site/search/agents/france/alsace/3">&gt;</a>&nbsp;

As you can see, though the text in the anchor tag is the number two, the actual href uses a 3. Any ideas?

Cheers,
Gareth


Messages In This Thread
Pagination produces the wrong page number - by El Forum - 08-07-2009, 01:31 PM
Pagination produces the wrong page number - by El Forum - 08-07-2009, 01:58 PM
Pagination produces the wrong page number - by El Forum - 08-07-2009, 01:58 PM
Pagination produces the wrong page number - by El Forum - 08-07-2009, 02:07 PM
Pagination produces the wrong page number - by El Forum - 08-07-2009, 07:01 PM



Theme © iAndrew 2016 - Forum software by © MyBB