0

I am using a script in my CMS site e.g.

<p>some text</p>

<script>
    some logic
</script>

How can I outsource it to my theme?

I created the script in app/design/frontend/mytheme/base/web/js/pages/home.js and tried to change my CMS site like this:

<p>some text</p>

<script src="/pages/home.js"></script>

But I get "404 not found" if I try to load www.example.com/pages/home.js

Your Answer

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

Browse other questions tagged or ask your own question.