How to add js and css to your magento template

Many times when you are working in a magento template you will need to add you own css or js files here how to do it:

magento-css-.jpg

Many times when you are working in a magento template you will need to add you own css or js files here how to do it:

Open up the CMS page in Magento that you want to add the javascript to, click on the “Custom Design” tab on the left, and in the “Layout Update XML” field add the following:

<reference name="head">
  <action method="addItem">
    <type>skin_js</type><name>js/yourfile.js</name>
  </action>
</reference>

easy pice of cake.

 

About the author
Eduardo Silva was born in Buenos Aires, Argentina, and has being living in London for the past 15 years. With a background in psychology he is a IT developer and the co-founder of open-ecommerce.org, a digital content social enterprise. His passion is digital story-telling and has created short films and documentaries to help people promote there ideas.