How to override layout file, which is already override by other theme.

For example, we have existing theme.


How to override somel_ayout.xml file in my current theme.

Help would be appreciated.

  • Does your theme inherit from the other theme? Either way, you should be able to follow the same pattern as the first theme. devdocs.magento.com/guides/v2.0/frontend-dev-guide/layouts/… – Ash Smith Feb 16 '17 at 10:09
  • Yes, it is not working even my current theme parent theme is <Vendor>\<themeone>, and i have already referred official Magento 2 documentation. – Krishna ijjada Feb 16 '17 at 10:12
  • it won't override but extend other theme xml file – klict Feb 16 '17 at 10:33
  • @klict Can you tell me how to extend. – Krishna ijjada Feb 16 '17 at 10:41

Try to change your etc/module.xml file to define your priority file (module/theme):

<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Module/etc/module.xsd">
    <module name="Vendor_Module" setup_version="1.0.0">
            <module name="Vendor_Test" />
            <module name="Magento_Customer" />
| improve this answer | |

if you want to override a layout file, create the same folder structure in the theme as in module's view/frontend. if the layout is placed in:


then place the file with which you want to override in:


If your xml is not created properly or contains any error. In this case it will follow the fallback technique.

| improve this answer | |
  • above technique will work only when the layout exists in any module. If it does, and then overridden in themeone , you can override it in your themetwo by using the same. – Pankaj Bhope Feb 17 '17 at 2:37
  • Please read the question, i want to override a layout file already overrided by theme override/base. Is there any technique to achieve this by new theme ? if yes, Please provide the example. – Krishna ijjada Feb 17 '17 at 5:56
  • 1
    can you post the snap of the directory structure of this particular theme. I will try to provide the solution. – Pankaj Bhope Feb 17 '17 at 9:20

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.