コントローラーからコンストラクターに変数を渡すにはどうすればよいですか?
function __construct()
{
parent::__construct();
$info['title'] = 'No title';
$this->load->view('include/header',$info);
}
function be_cool()
{
$info['body'] = 'template/becool';
$info['title'] = 'This is the be cool title';
$this->load->view('include/template',$info);
}
function be_hot()
{
$info['body'] = 'template/behot';
$info['title'] = 'This is the be hot title';
$this->load->view('include/template',$info);
}
コントローラーで定義された値に基づいてタイトルを変更しようとしています。しかし、それは機能していないようです。私は何が間違っているのですか?