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 Answer 1

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 and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.