[eluser]joeizang[/eluser]
hi,
I saw the template library and I was "megally" impressed, Nice work. But I have some newbie questions as I am new with CI (only done 2 basic sites) and my third I want to use template.
Q1: Adding utilities i understand but I wanted to know if I have 4 js files and 4 css files and add them, how does template know which to use where i need it? example I have a .js file for displaying the current time, will know it's that one I want and not the jquery.js file i have?
Q2: I have my js and css files in an assets folder in my project but I also have images for all my images, so my question is, will this code work if I add it to the template library if my first question's answer is "yes template can figure out what I want some how".
Code:
function add_image($imgfile)
{
$success = TRUE;
$img = NULL;
$this->CI->load->helper('url');
$filepath = base_url() .$imgfile;
$img = '<img src='.$filepath.'/>';
// Add to js array if it doesn't already exist
if ($img != NULL && !in_array($img, $this->img))
{
$this->img[] = $img;
$this->write('_images', $img);
}
return $success;
}
i simply modified one of the functions for images. Any thoughts?