1

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

local.xml

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

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

1

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.