I'm trying to add a custom Js to my custom template.


<?xml version="1.0"?>
       <reference name="head">
           <action method="addItem"><type>skin_js</type><name>js/main.js</name></action>

I've placed my .JS in the skin folder. I've repeatedly refreshed my cache. But it won't output the console.log i've placed in it. <?php echo $this->getChildHtml() ?> is also in head.phtml


You have to put your .js in js folder in your skin folder

Be sure main.js is not main.JS

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.