Best way to include view within view in Codeigniter template using Dwoo? Best way to include view within view in Codeigniter template using Dwoo? codeigniter codeigniter

Best way to include view within view in Codeigniter template using Dwoo?


I don't know about Dwoo, but you should be able to assign the parser's output to a variable and pass that to your view:

$data_array['header'] = $this->parser->parse('header', $header_data, TRUE);

If you don't need to parse your header/footer, just assign the view output to a variable and pass that to your template. The syntax is basically the same:

$data_array['header'] = $this->load->view('header', '', TRUE);

Ref: http://codeigniter.com/user_guide/libraries/parser.html and http://codeigniter.com/user_guide/general/views.html

Then, from the looks of it (reading Dwoo's wiki on usage), you'll just add {$header} to your template where you want your header to appear.