CodeIgniter Forums
Pagination links not updating from sub-folders - 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: Pagination links not updating from sub-folders (/showthread.php?tid=17522)



Pagination links not updating from sub-folders - El Forum - 04-07-2009

[eluser]tlam[/eluser]
I used to have my pagination codes under a controller in the folder controllers. After moving it to a sub-folder(thesub) under controllers, the pagination is working but the links are not updated.

controllers/thesub

In my helloworld controller, I've made the following changes to include the subfolder thesub:

Code:
$config['base_url'] = base_url().'thesub/helloworld/index/';
$this->uri->segment(4);  // used to be 3 before
$this->load->view('thesub/helloworld_view', $data);

My views have also been put in the subfolder thesub, views/thesub with the following changes in the view file:

Code:
<?=form_open('thesub/helloworld');?>

The pagination link in my view keeps showing the following all the time:
1 2 3 Next ยป

where 1 is always bolded while 2, 3 and Next are always hyperlinked. The hyperlinks work but they don't get updated. Any ideas what I'm missing?


Pagination links not updating from sub-folders - El Forum - 04-07-2009

[eluser]tlam[/eluser]
Nevermind, the following fixes it:

Code:
$config['uri_segment'] = 4;