0

I know this question has been asked a lot but I still can't figure out how to solve this problem. I'm not sure what I'm doing wrong.

Basically, what I did was I separated the jQuery files and added them in a template group called "styles" like so: enter image description here

In the html file I tried to link them by using these code:

<script type="text/javascript" src="{path="styles/java"}"></script> 
<script type="text/javascript" src="{path="styles/cycle"}"></script> 
<script type="text/javascript" src="{path="styles/min"}"></script> 

I know it seems to be a dump question but I'm totally new to this.

Thanks!

  • 1
    AFAIK you can only link stylesheets up in this way. However, as was said in an answer below, it's probably better to take these out of EE's template system altogether. – foamcow Aug 4 '14 at 8:07
1

I never use CSS or Javascript files as EE templates. Better to leave them as static files on the server and link to them like you normally would. Something like this (assuming the files are in a folder named "js"):

<script type="text/javascript" src="/js/java.js"></script> 
<script type="text/javascript" src="/js/cycle.js"></script> 
<script type="text/javascript" src="/js/min.js"></script> 
| improve this answer | |
  • Thank you Benek for your quick reply. Where do I find this folder exactly? is it in the ee folder? – user3282 Aug 4 '14 at 7:35
  • You have to create the folder in your web root. It's not part of the EE system. My whole point is to put those files outside of EE. – Benek Lisefski Aug 4 '14 at 7:41
  • I added the folder in the web root and added the codes in the head in my html file, but it's still doesn't work. not sure what i'm doing wrong – user3282 Aug 4 '14 at 8:11
  • any idea what the problem might be? – user3282 Aug 4 '14 at 10:05
  • What do you mean by "doesn't work"? Aren't the files being served or aren't the scripts working? – Robson Sobral Aug 4 '14 at 13:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.