0

Anyone know what could be wrong? It doesn't load files residing in /craft/templates/js that I include with for example {% includeJsFile "/js/file.min.js" %}, only if the js folder is in the public folder.

2
  • 1
    That should work out of the box – very odd. You might want to turn on devMode and visit the URL to your JS assets directly (e.g. "example.com/js/file.min.js") in your browser, just to see what Craft spits out. Also, check your logs in /craft/storage/runtime/logs for [error] messages. In any case; be advised that keeping JS and/or CSS files in the /templates folder is not best practice – unless you have a very good reason, you should always serve JS & CSS from your public folder. Commented Nov 8, 2016 at 0:41
  • Will check it out and report back.
    – Anders
    Commented Nov 8, 2016 at 23:36

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.