-1

What is the equivalent to the bellow code for Magento 2.2.2

This work for magento 1.9.2.7 :

<reference name="head">
    <block type="core/text" name="pixel">
        <action method="setText">
            <text><![CDATA[<!-- Custom Stuff Goes here like meta tags js script tags and css links -->]]></text>
        </action>
    </block>
</reference>

What is the equivalent of Magento 2.2.2?

Thanks.

-1

You can add XML file in your theme :

app/design/frontend/Vendor/YourCustomTheme/Magento_Theme/layout/default_head_blocks.xml

<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<head>
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1.0, user-scalable=no"/>

</head>
</page>
  • is that not working for you ? – hweb87 Apr 30 '18 at 10:44
  • I am not sure if you understood the question. I need to add this in the admin, per page in the Design Layout update XML field? – Juliano Vargas Apr 30 '18 at 14:24
  • If you need your changes in all page than you can add Magento_Theme. Have you tried above code?? – hweb87 Apr 30 '18 at 14:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.