Welcome
This template class caches vars in arrays, and can add entries to already cached vars. It can also insert CSS <link> and Javascript file <script> HTML tags.
Used to exist as an extension to the CI Loader class, for compatibility reasons to modular_extensions of wiredesignz. I've switched to a self contained library with the inconveniance to especially need to fetch the vars in the main view.
Usage
Defining / adding vars
add var_name to the cached vars
$this->template->add_var('var_name', $values)
add file_name to the CSS files to include
$this->template->css('file_name')
add file_name to the Javascript files to include
$this->template->js('file_name')
If the class is used as MY_Loader all defined vars are automatically available in all views ! Calls are
$this->load->css() instead of $this->template->css().
Retrieving vars / file calls
fetch the cached var var_name
$this->template->get_var('var_name')
insert all CSS file calls into view
$this->template->css_files()
insert all Javascript file calls into view
$this->template->js_files()