[eluser]jacobson[/eluser]
Hello, i have a question... I have controller in which i pass the variable $data['main_content'] with the main content of the view. In order to do that i load view template
in this template i load header view, this main content and the footer. In the header view I load the login bar view.
Now I want to load this login bar in each site by using MY_Controller I've tried loading view, assigning to the variable and trying to echo variable in the header view but it didn't work :/
Code:
class MY_Controller extends CI_Controller {
function __construct() {
parent::__construct();
$this->load->view('includes/login_bar');
}
}
but it doesnt work :/
my original controller
Code:
$data['main_content'] = '/main/main';
$this->load->view('includes/template', $data);
Anyone could tell me what code should I implement in MY_Controller or give any hint :p in order to build the thing I want