Welcome Guest, Not a member yet? Register   Sign In
How to make tow data paging in one page view
#1

[eluser]Unknown[/eluser]
dear friends,


I wanna ask how to make two data paging in one page view. Assumed I have two different url, for first data paging I use index.php/view1/ and for the second I use index.php/view2/. I've already tried to make two configuration for initialization paging in one controller but is still failed, there is no pagination links at all. Can you help me?? thx b4..

NB : For moderator,if I'm in wrong thread please move it.
#2

[eluser]xwero[/eluser]
I don't see why two different methods should share their pagination? If you click on the pagination of the other method you get redirected to the other method creating a situation that could get confusing.
#3

[eluser]Unknown[/eluser]
Now, I can show the pagination links. But there is some problem I confuse. I have some code like this :
Code:
...
$data['result1'] = $this=>model_data->query1();
$this->pagination->initialize($config); //config for making first data paging

...
$data['result2'] = $this->model_data->query2();
$this->pagination->initialize($config2); //config for making second data paging

/* then load view */
$this->load->view('data_view', $data);

I have assumed that $data['result1'] and $data['result2'] will be displayed in view, but I don't know why it's different. From the code above, view just will show $data['result2'], and $data['result1'] will be blank. I don't know what is wrong from my code.




Theme © iAndrew 2016 - Forum software by © MyBB