当我显示我的视图时,我反复必须包含一个变量:
$this->load->view('login', array('logged_in' => $this->auth->is_logged_in()));
$this->load->view('somepage', array('logged_in' => $this->auth->is_logged_in()));
$this->load->view('anotherpage', array('logged_in' => $this->auth->is_logged_in()));
如何在我的所有视图输出中包含这一变量?有没有比扩展模板类更简单的方法?