[eluser]igniteflow[/eluser]
Hi, apologies if this is a newbie question. I am using various javascript libraries across my site and I don't want to load all of them for every page. I am passing the variables through the controller methods to a _header.php view which is included in the target view page, for example with something like this
Controller
Code:
function index()
{
$data['js'] = "js/jquery.js";
$this->load->vars($data);
$this->load->view('template');
}
View
but if the variable is empty the page throws an error. My question is how can I avoid this and what's the best way to achieve this? I know I can use the html helper class to make printing this easier, but I'm more concerned about the blank variables. Thanks