CodeIgniter Forums
[Solved] Pagination not displaying First and Last links - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived General Discussion (https://forum.codeigniter.com/forumdisplay.php?fid=21)
+--- Thread: [Solved] Pagination not displaying First and Last links (/showthread.php?tid=21024)



[Solved] Pagination not displaying First and Last links - El Forum - 07-28-2009

[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).


[Solved] Pagination not displaying First and Last links - El Forum - 07-28-2009

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

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