Codeigniter multiple views in one view Codeigniter multiple views in one view codeigniter codeigniter

Codeigniter multiple views in one view


one approach is to have a template view that has the elements you require.see this pseudo-code example...so, template_view.php has:

$this->load->view('header',$header);    $this->load->view('quicksearch',$quickssearch);    $this->load->view('body',$body);    $this->load->view('footer',$footer);

your single controller then calls the template with the parameters for each view.

$data = new stdClass();$data->header = ....$data->quickssearch = ....$data->body = .....$data->footer = .....$this->load->view('template_view',$data);