ExpressionEngine, I would like to add a JS file to a template

63 views Asked by At

For one of my clients I need to update the website. Therefore I would like to add a JS file. So I have never worked with ExpressionEngine before, so I downloaded the Core Version.

On my laptop I would now like to add to the theme "agile_records" (seems to be the standard theme) a js file. I saw there is a folder: /themes/site_themes/agile_records/js there I have copied the js file.

Next I have put a new line in the following file:

themes/site_themes/agile_records/global_variables/js

but unfortunately when I look into the source code of safari, my js file has not been included, not even the new line I have added to the file above.

Can anyone help me out, how I can add this JS to the template?

cheers

1

There are 1 answers

0
imjared On

You should be able to just add it with a script tag. Try something like <script src="/js/filename"></script>.

This obviously assumes that agile_records is the root of the project.