Welcome Guest, Not a member yet? Register   Sign In
[Solved] Pagination not displaying First and Last links
#1

[eluser]NTICompass[/eluser]
I am using the Pagination Class and it is not displaying the 'First' and 'Last' links.

Code:
$this->load->library('pagination');
        
$this->config->set_item('enable_query_strings', FALSE);
$config['base_url'] = '/blog/index/';
$config['total_rows'] = $data['query']->row()->Count;
$config['per_page'] = $perPage;
$config['first_link'] = '≤';
$config['last_link'] = '≥';
$config['full_tag_open'] = '<div>';
$config['full_tag_close'] = '</div>';
$this->pagination->initialize($config);

$data['pages'] = $this->pagination->create_links();
        
$this->load->view('blog_view', $data);

I get the following output, no First and Last links.
Code:
< 1 2 3 >

What's wrong?

P.S.
$data['query'] is an SQL query containing a SELECT COUNT(*) FROM `Content` command.
$data['query']->row()->Count gets the Count result.
$perPage is just a variable (set to 5 currently).
#2

[eluser]NTICompass[/eluser]
WOW, I'm dumb.

There were too little pages to have Fist and Last links displayed >.<




Theme © iAndrew 2016 - Forum software by © MyBB