CodeIgniter Forums
Pagination problem with first page link - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23)
+--- Thread: Pagination problem with first page link (/showthread.php?tid=50643)



Pagination problem with first page link - El Forum - 04-02-2012

[eluser]afshin[/eluser]
Hi .
For a period of time, I have been dealing with an issue in pagination class.

The problem is that, everything with pagination is okay, except the link of page 1.

All the links are like :

http://example.com/method/page/2
http://example.com/method/page/3
...

but, when I want to go to the page 1, the link looks like :

http://example.com/method/page/

and of course it looks somehow awkward.

How can I fix this issue in pagination library?!


Pagination problem with first page link - El Forum - 04-03-2012

[eluser]afshin[/eluser]
The problem has been solved

I changed my code to look like :

My base_url was :

Code:
$config['base_url'] = base_url() . 'method/page/';

So, I changed the code like below to have the first URL as I wish :

Code:
$config['base_url'] = base_url() . 'method/page/';
    $config['first_url'] = '1';
    $this->pagination->initialize($config);