Hi I have the new version of codeigniter I would like to load views array example: it is not picking it up in codeigniter. I would like to know what way is correct and what I am doing wrong.
$this->children = array(
'common/footer',
'common/header'
);
Here is what I am would like it to look like I have go if file exist working.
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
class Home extends CI_Controller {
public function index() {
if (file_exists('views/theme' . 'default/template/common/home.tpl')) {
$this->load->view('theme'. 'default/template/common/home.tpl');
}
else {
$this->load->view('theme/default/template/common/home.tpl');
}
$this->children = array(
'common/footer',
'common/header'
);
}
}