[SOLVED]How to reference a js file with a root variable?
Posted: Thu May 16, 2013 2:51 pm
Within my template I have the following script tag..
which works no matter what page I go to under my site.
But if I change it to...
...then jQuery is only detected on the home page. FYI - I am using $config['url_rewriting'] = 'mod_rewrite';
Is there anyway I can write something like this in my template...
When I try this, it fails on me as well. The point being is that I don't want to keep manually changing this path every time I move my cmsms site from my local host to my live server. I want it to reference the js scripts under my uploads directory, for any page I land on.
Thanks!
Code: Select all
<__script__ type='text/javascript' src='/dev2/uploads/js/jquery-1.8.3.min.js'></__script>
But if I change it to...
Code: Select all
<__script__ type='text/javascript' src='uploads/js/jquery-1.8.3.min.js'></__script>
Is there anyway I can write something like this in my template...
Code: Select all
<__script__ type='text/javascript' src='{root_url}/uploads/js/jquery-1.8.3.min.js'></__script>
Thanks!