Last active
December 10, 2015 02:09
-
-
Save jacquesbh/4365871 to your computer and use it in GitHub Desktop.
Ajouter un script externe au header sur Magento (http://jacques.sh/ajouter-un-script-externe-au-header-sur-magento.html)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<block type="core/text" name="head.jquery"> | |
<action method="setText"> | |
<text><![CDATA[<script src="//ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script>]]></text> | |
</action> | |
</block> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$text = "Hello World!"; | |
$block = Mage::app()->getLayout()->createBlock('core/text')->setText($text); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$text = '<script src="//ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script>'; | |
$block = Mage::app()->getLayout()->createBlock('core/text')->setText($text); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="utf-8" ?> | |
<layout version="0.1.0"> | |
<default> | |
<reference name="head"> | |
<block type="core/text" name="head.jquery"> | |
<action method="setText"> | |
<text><![CDATA[<script src="//ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script>]]></text> | |
</action> | |
</block> | |
</reference> | |
</default> | |
</layout> | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="utf-8" ?> | |
<layout version="0.1.0"> | |
<default> | |
<reference name="head"> | |
<block type="core/text" name="head.base_url"> | |
<action method="setText"> | |
<text><![CDATA[<script type="text/javascript">var BASE_URL = '{{baseUrl}}';</script>]]></text> | |
</action> | |
</block> | |
</reference> | |
</default> | |
</layout> | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment