Quantcast
Channel: codeigniter : pass data to a view included in a view - Stack Overflow
Browsing latest articles
Browse All 6 View Live

Answer by NaturalBornCamper for codeigniter : pass data to a view included in...

Also try this to if you want every single CodeIgniter view data in a subview:echo $this->view('subview', get_defined_vars()['_ci_data']['_ci_vars'])

View Article


Answer by sudhakar phad for codeigniter : pass data to a view included in a view

I have seen in my view files, if I'm passing data from controller to view and from that view to included nested view files. there is no need to transfer $datafor your nested view it is already...

View Article

Answer by thelastshadow for codeigniter : pass data to a view included in a view

castis's solution workshowever if you want to do this on a more finely grained level you can use://in your controller$data['whatever'] = 'someValue';.//In your viewecho $whatever //outputs...

View Article

Answer by Jakub for codeigniter : pass data to a view included in a view

This Codeigniter forum post should help you ;)You can either make your $data (example) global in the controller, or pass just like @castis mentioned from within your view (variables only in your...

View Article

Answer by tinybluerobot for codeigniter : pass data to a view included in a view

Inside your controller, have $data['nestedView']['otherData'] = 'testing';before your view includes.When you call$this->load->view('view_destinations',$data);the view_destinations file is going...

View Article


codeigniter : pass data to a view included in a view

I have a controller and including two views from one function as below$this->load->view('includes/header',$data);$this->load->view('view_destinations',$data);The view file...

View Article
Browsing latest articles
Browse All 6 View Live