I am working on a Magento 2.1.7 shop and I have created a child-theme of Magento Blank.

I've changed the layout of my homepage to 2 columns with left bar from Content -> Pages. I need to do the same for the Contact Us page.

As can be seen in the image below, I don't have this option for the Contact Us page:

enter image description here

What (XML) file must I edit to achieve this?

3 Answers 3


Contacts US is not a cms page and it is an Module page which is manage from Magento_Contacts module.

So, if you want to changes the layout then you should do some code.

Createcontact_index_index.xml if does not exits at


Then create add below codes for changes the layout

<?xml version="1.0"?>
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" layout="1column" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">

Here, i have set contact us page layout as 1column


you can use

 - layout="2columns-left" if want to changes to 2 columns left

 - layout="2columns-right" if want to changes to 2 columns right

 - layout="3columns" if want to changes to 3 columns
  • This is my question: what file(s) shall I change? Dec 12, 2017 at 10:31
  • So, Do you want to changes page layout for all cms page or Contacts US page?
    – Amit Bera
    Dec 12, 2017 at 10:33
  • "Contact US" page. Dec 12, 2017 at 10:35
  • Is there a way I can add content from the Magento admin above the contact form? Something like: Address: 914-3472 Quisque Rd, Rome. Dec 13, 2017 at 9:50
  • Create a CMS static block and add this block usin WIDGet
    – Amit Bera
    Dec 13, 2017 at 10:42

Navigate to


find this line

<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" layout="1column" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">

and replace with

<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" layout="2columns-left" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">

If you want to override this layout file in your custom module, create


and apply the changes as given above.

Don't forget to use sequence in your custom module's etc/module.xml file

<?xml version="1.0"?>

<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/internal/Magento/Framework/Module/etc/module.xsd">
    <module name="Vendor_Module">
            <module name="Magento_Contact"/>
  • I would like to overwrite the contact_index_index.xml file from the theme. How can I do that? Dec 12, 2017 at 10:38
  • check my updated answer Dec 12, 2017 at 10:42
  • I don't have a custom module. I have a custom theme: app/design/frontend/myCompany/my_theme Dec 12, 2017 at 10:52
  • if you added the answer for theme also Dec 12, 2017 at 10:57
  • create app/design/frontend/myCompany/my_theme/Magento_Contact/layout/contact_index_index.xml and do the changes as given in the answer. Dec 12, 2017 at 10:58

To edit contact us page you need to edit the form.phtml listed in \vendor\magento\module-contact\view\frontend\layout\contact_index_index.xml

  • Its not recommended to edit vendor files... Mar 26, 2019 at 11:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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