I've created a simple plugin based on the Craft docs with the following directory structure...


In the index.html template of my plugin I'm using the following line to try to include the public.js file...

{% includeJsResource "eforms/js/public.js" %}

Which attempts to include the following resource in the browser


Unfortunately this just gives me a 404. Does anyone have an idea of what I'm doing wrong?

1 Answer 1


Think you need:


There is more info over at http://buildwithcraft.com/docs/plugins/resources


ok, scrap that answer, I didn't read the rest of the help page :)

I think you are nearly there though. I'll have a test on my local machine and get back to you.

Edit 2

I believe I'm running into the same problem you have described as well. I did however get it working by doing this:

<script src="{{ resourceUrl('eforms/js/public.js') }}"></script>
  • I appreciate the effort but unfortunately this file needs to appear after a number of others so I must use the includeJsResource method.
    – michael
    Jul 29, 2014 at 9:55

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.