Skip to content

Magento: Add External JS/CSS File to Header Tag

this is example how to add an external JS/CSS files to magento header into layout file :

<default>

<reference name=”head”>
<block type=”core/text” name=”google.cdn.jquery”>
<action method=”setText”>
<text><![CDATA[

<script type=”text/javascript” src=”https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js”></script>
<script type=”text/javascript”>jQuery.noConflict();</script>

<link href=’http://fonts.googleapis.com/css?family=Montserrat’ rel=’stylesheet’ type=’text/css’>
]]></text>
</action></block>
</reference>
</default>

Share

Be First to Comment

Leave a Reply

Your email address will not be published. Required fields are marked *

Time limit is exhausted. Please reload CAPTCHA.