Hobbit78
12/21/2018 - 10:53 AM

Load script in cms pages

With this script it's possible to load random scripts in the head of a CMS Page in Magento 1.

<reference name="after_head_start">
    <block type="core/text" before="-" name="name.for.this.block" >
        <action method="setText">
            <text>
                <![CDATA[
                    <script src="https://some.url/to.js" type="text/javascript" charset="UTF-8"></script>
                    <script type="text/javascript">
                    function OptanonWrapper() { }
                    </script>
                ]]>
            </text>
        </action>
    </block>
</reference>