I\'m a very newbie on CodeIgniter, and while I go on I run into problems that, in the procedural coding, were easy to fix
The current issue is: I have this controlle
Even though its been so long. It can be helpful to other you can use $this->load->vars($data); in core MY_controller to make $data array available in all views.
/* Location: ./application/core/MY_Controller */
class MY_Controller extends CI_Controller {
function __construct()
{
parent::__construct();
$data['title'] = 'Page Title';
$data['robots'] = 'noindex,nofollow';
$data['css'] = $this->config->item('css');
$this->load->vars($data);
}
}
/* Location: ./application/controllers/start.php */
class Start extends MY_Controller {
function __construct()
{
parent::__construct();
}
public function index()
{
$data['myvar'] = "mystring";
$this->load->view('header');
$this->load->view('start', $data);
$this->load->view('footer');
}
}