Welcome Guest, Not a member yet? Register   Sign In
pagination not anchoring first link when on second page
#1

[eluser]vtatds[/eluser]
When I click on "2" in my pagination links, I get the results I'm expecting as far as data. But, "2" stays anchored and "1" is not anchored.

I have the following config for the pagination library in a controller:
Code:
$this->load->library('pagination');
$config['base_url'] = base_url().'index.php/benchmarks/view2/'.$benchmarkid.'/';
$config['total_rows'] = count($data['resultdatescount']);
$config['per_page'] = '5';
$this->pagination->initialize($config);
        
$data['benchmarks'] = $this->Benchmarks_model->getbenchmark($benchmarkid);
$data['resultdates'] = $this->Benchmarks_model->view_all_dates2($benchmarkid, $config['per_page'], $this->uri->segment(4,0)); //
$data['benchmarkresults'] = $this->Benchmarks_model->view_all2($benchmarkid, $config['per_page'], $this->uri->segment(4,0));
        
$this->load->view('header_view', $data);
$this->load->view('nav_view', $data);
$this->load->view('benchmarks_view_all2', $data);
$this->load->view('footer_view', $data);

and place this in my view:
Code:
echo $this->pagination->create_links();

now that i've finally got a query worked out, I can eliminate the view_all_dates2, but I don't see how that would cause this issue.


Messages In This Thread
pagination not anchoring first link when on second page - by El Forum - 10-06-2010, 10:24 PM
pagination not anchoring first link when on second page - by El Forum - 10-07-2010, 01:14 AM
pagination not anchoring first link when on second page - by El Forum - 10-07-2010, 07:47 AM
pagination not anchoring first link when on second page - by El Forum - 12-01-2010, 06:43 AM
pagination not anchoring first link when on second page - by El Forum - 06-06-2012, 02:57 PM



Theme © iAndrew 2016 - Forum software by © MyBB