[eluser]luben[/eluser]
Hi guys, this is my first post in the forums.
I have the same problem that is stated here. I want to include css file in my header view, that will be included throught the whole site. However, I have a global css file that I need included every time I call the header view, e.g.
Code:
$this->load->view('global/header-view.php');
The solution above however does not seem sensefull, because I'll have to include a lot of source code in ALL my controllers to load this global css file.
Do you know, if there's easier way to include a css file in all pages, without writing 5-6 duplicate lines in all my controllers?
E.g. I want to avoid this code in ALL controllers:
Code:
// load html helper
$this->load->helper('html');
//load url helper
$this->load->helper('url');
// set name and path for css
// note the base_url() must be concatenated with the location of the css
$data['cssfile'] = base_url().'style/style.css';
My directory structure is like this:
Code:
/system
/css
---/main.css
/images
Thank you very much!
luben