What is the equivalent to the bellow code for Magento 2.2.2

This work for magento :

<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>

What is the equivalent of Magento 2.2.2?



You can add XML file in your theme :


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

  • 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.