How to include external library in scripts.tpl

I’d like to add a google api framework library from the web. I’ve added it to common_templates/scripts.tpl below the following code:



{script src=“lib/jquery/jquery.js”}

{script src=“js/core.js”}

{script src=“js/ajax.js”}



{script src=“http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js”}



In this example it’s jquery, but that’s of non consequence. When I do this, what ends up getting added in the html is:




I've tried a bunch of different things but cannot get it to not add the "/store/" before any address I put.

How do I get it to look to the web instead of a relative directory structure?

Thanks,
Joe

Anybody figure it out?

I would probably approach this differently and use a styles.post.tpl file in your my_changes addon in the customer/addons/my_changes/hooks/index directory. I would do it as:

```php


```



This should prevent the template engine or the javascript from rewriting your code.

Thanks tbirnseth!



I did what you suggested and it worked perfectly. Then I started thinking about WHY it worked and discovered it was not the template location but the way the script was caled.



I was trying the same way cs-cart was doing it with “{ }” brackets. I guess when you do that, the smarty compiler assumes a relative direcetory. When I did a traditional script call with “” like you put above, it worked regardless of which template I placed it.



Good to know…thanks again!

[quote name=‘tbirnseth’]I would probably approach this differently and use a styles.post.tpl file in your my_changes addon in the customer/addons/my_changes/hooks/index directory. I would do it as:

```php


```



This should prevent the template engine or the javascript from rewriting your code.[/QUOTE]



To do something similar, do I need to create a my_changes folder as I do not see one in my installation ?

[quote name=‘m-space’]To do something similar, do I need to create a my_changes folder as I do not see one in my installation ?[/QUOTE]



Make sure the my_changes addon is installed (Administration/Addons).



You will probably have to create the top-level directory because by default nothing is distributed with this addon. Hence there was nothing to install when the skin was created.



Just watch your file ownerships and permissions to be correct for your server environment.