pagination help |
[eluser]theprodigy[/eluser]
print_r your $data array after adding the call to create_links() to see what is being passed back to your pagination element: Code: $this->pagination->initialize($config); if it's adding the correct data (looks to be 2 pages), try adding the print_r() to your $pagination variable in your view.
[eluser]sasori[/eluser]
@theprodigy & @Maria Claria i did tried to analyze and print the $data Code: $this->load->model('stock_model'); view Code: <?php echo $pagination; ?> Quote:A PHP Error was encountered i dunno why was 'pagination' is undefined when i already included it on the controller $data array
[eluser]maria clara[/eluser]
that means it has a null value. the scripts are not reading it. you have to declare the $pagination. try this in your view: <?=lang('pagination');?> hope that works.
[eluser]theprodigy[/eluser]
ok, try one more thing, after that, I'm completely lost. Instead of: Code: $this->load->view('stocks_view',$data); Code: $this->load->vars($data);
[eluser]sasori[/eluser]
@maria clara i tried <?=lang('pagination');?> i got a call to undefined function lang error @theprodigy I got the same error, it just got moved to line 33
[eluser]maria clara[/eluser]
view: <?php echo $pagination; ?> controller: $this->pagination->initialize($config); $data['pagination'] = $this->pagination->create_links(); $this->load->view('stocks_view', $data);
[eluser]sasori[/eluser]
[quote author="maria clara" date="1263992323"]view: <?php echo $pagination; ?> controller: $this->pagination->initialize($config); $data['pagination'] = $this->pagination->create_links(); $this->load->view('stocks_view', $data);[/quote] it doesn't work, its the same code i used some hours ago Quote:A PHP Error was encountered line 33 = <?php echo $pagination; ?>
[eluser]maria clara[/eluser]
look at this link http://pinoytech.org/blog/post/paginatio...odeigniter an article about pagination in CI. i have used jquery for my pagination.
[eluser]sasori[/eluser]
that page got a trojan downloader according to my anti-virus. but anyway, thank you very much to both of you @maria clara @theprodigy for spending sometime helping.
[eluser]John Pantoja[/eluser]
Got hit with the av block as well, sucks as I'm getting around to this topic soon. Wonder if it's the common attack on Filipino sites (have to remind el wifo again not to visit her pr0n sites). |
Welcome Guest, Not a member yet? Register Sign In |