I am modifying a Magento theme. And want to add a js file into the theme /js
folder. I have added the following code:
<action method="addItem"><type>skin_js</type><name>js/custom-script.js</name></action>
into the /app/design/frontend/theme-name/default/layout/page.xml
and published the js file into /skin/frontend/theme-name/default/js/
. But no luck. It is not showing on the page.
Try adding the following to your layout .xml
file within <reference name="head">
<action method="addJs">
<script>js/custom-script.js</script>
</action>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With