Welcome Guest, Not a member yet? Register   Sign In
Pagination links not updating from sub-folders
#1

[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?
#2

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

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




Theme © iAndrew 2016 - Forum software by © MyBB