I am using plenty of CSS and JavaScript in my CodeIgniter application.
Here is my sample controller.
public function index() {
$this->load->view('site/title');
$this->load->view('site/menu');
$this->load->view('site/asset');
$this->load->view('site/css');
$this->load->view('site/js');
$this->load->view('site/content');
}
Though I load the CSS files and JavaScript files in the view itself like this:
<link href="<?php echo base_url()?>css/all.css" rel="stylesheet">
<link href="<?php echo base_url()?>css/theme.css" rel="stylesheet">
What I want is if I change the CSS folder location to some other i.e., (asset/css)
I need to change the path in all the functions. How can I avoid this and make it simple?