Magento 2.3 How to override the custom theme's etc/layouts.xml file in recommended way?How to override Magento directory module /etc XML fileHow to remove a config xml value?Can someone explain the app/etc/local.xml file?Magento 2: What are the “top level tags” in a Module Layout Handle XML File Called?Update block arguemnts in xml file (Recommended way not working)What's your way of debugging xml related exceptions?Magento 2 - Override an xml file defined in the etc folder in a theme?What are the cases in which $this from a custom theme's template does not recognize the theme's appropriate block?Magento 2 override Magento_Checkout updatecart.phtml and include js fileHow to override Magento directory module /etc XML fileHow can I regenerate vendor/magento/module-directory/etc/config.xml?

One word for 'the thing that attracts me'?

Why A=2 and B=1 in the call signs for Spirit and Opportunity?

How can I prevent holy aura from a human body from radiating too strongly?

The disk image is 497GB smaller than the target device

What is the use case for non-breathable waterproof pants?

Dad jokes are fun

Is superuser the same as root?

Should I split timestamp parts into separate columns?

Why is the Eisenstein ideal paper so great?

Underwater city sanitation

Creating second map without labels using QGIS?

What did the 'turbo' button actually do?

What is the recommended procedure to land a taildragger in a crosswind?

Is "vegetable base" a common term in English?

If I arrive in the UK, and then head to mainland Europe, does my Schengen visa 90 day limit start when I arrived in the UK, or mainland Europe?

Can a UK national work as a paid shop assistant in the USA?

Why did it take so long for Germany to allow electric scooters / e-rollers on the roads?

Why does Bran want to find Drogon?

Why sampling a periodic signal doesn't yield a periodic discrete signal?

Why do Russians almost not use verbs of possession akin to "have"?

Fixie: how to learn to ride: step by step

How to melt snow without fire or using body heat?

Why is this integration method not valid?

Freedom of Speech and Assembly in China



Magento 2.3 How to override the custom theme's etc/layouts.xml file in recommended way?


How to override Magento directory module /etc XML fileHow to remove a config xml value?Can someone explain the app/etc/local.xml file?Magento 2: What are the “top level tags” in a Module Layout Handle XML File Called?Update block arguemnts in xml file (Recommended way not working)What's your way of debugging xml related exceptions?Magento 2 - Override an xml file defined in the etc folder in a theme?What are the cases in which $this from a custom theme's template does not recognize the theme's appropriate block?Magento 2 override Magento_Checkout updatecart.phtml and include js fileHow to override Magento directory module /etc XML fileHow can I regenerate vendor/magento/module-directory/etc/config.xml?






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;








1















There is, in a theme that I bought a layout.xml file that is used in the backoffice to hydrat a select element (that allows you to switch between 5 layouts).



app/code/CompanyTheme/LayoutSwitcher/etc/layouts.xml



this file contains



<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:CompanyTheme_LayoutSwitcher:etc/layouts.xsd">
<layout id="header_layout_1" label="Header Layout 1" type="header" />
<layout id="header_layout_2" label="Header Layout 2" type="header" />
<layout id="header_layout_3" label="Header Layout 3" type="header" />
<layout id="header_layout_4" label="Header Layout 4" type="header" />
<layout id="header_layout_5" label="Header Layout 5" type="header" />
</config>


I want to add a sixth layout. For the moment I have modified this file directly to add a line (layout 6), but I know that this is not correct because the changes I made will disappear the next time I update the code that does not belong to me.



I searched but I don't know if it is possible to override this kind of file. If so, please give me some hints or on the contrary confirm that we can't...










share|improve this question
























  • See that answer it can help you An response here

    – n44s
    May 16 at 14:16

















1















There is, in a theme that I bought a layout.xml file that is used in the backoffice to hydrat a select element (that allows you to switch between 5 layouts).



app/code/CompanyTheme/LayoutSwitcher/etc/layouts.xml



this file contains



<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:CompanyTheme_LayoutSwitcher:etc/layouts.xsd">
<layout id="header_layout_1" label="Header Layout 1" type="header" />
<layout id="header_layout_2" label="Header Layout 2" type="header" />
<layout id="header_layout_3" label="Header Layout 3" type="header" />
<layout id="header_layout_4" label="Header Layout 4" type="header" />
<layout id="header_layout_5" label="Header Layout 5" type="header" />
</config>


I want to add a sixth layout. For the moment I have modified this file directly to add a line (layout 6), but I know that this is not correct because the changes I made will disappear the next time I update the code that does not belong to me.



I searched but I don't know if it is possible to override this kind of file. If so, please give me some hints or on the contrary confirm that we can't...










share|improve this question
























  • See that answer it can help you An response here

    – n44s
    May 16 at 14:16













1












1








1








There is, in a theme that I bought a layout.xml file that is used in the backoffice to hydrat a select element (that allows you to switch between 5 layouts).



app/code/CompanyTheme/LayoutSwitcher/etc/layouts.xml



this file contains



<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:CompanyTheme_LayoutSwitcher:etc/layouts.xsd">
<layout id="header_layout_1" label="Header Layout 1" type="header" />
<layout id="header_layout_2" label="Header Layout 2" type="header" />
<layout id="header_layout_3" label="Header Layout 3" type="header" />
<layout id="header_layout_4" label="Header Layout 4" type="header" />
<layout id="header_layout_5" label="Header Layout 5" type="header" />
</config>


I want to add a sixth layout. For the moment I have modified this file directly to add a line (layout 6), but I know that this is not correct because the changes I made will disappear the next time I update the code that does not belong to me.



I searched but I don't know if it is possible to override this kind of file. If so, please give me some hints or on the contrary confirm that we can't...










share|improve this question
















There is, in a theme that I bought a layout.xml file that is used in the backoffice to hydrat a select element (that allows you to switch between 5 layouts).



app/code/CompanyTheme/LayoutSwitcher/etc/layouts.xml



this file contains



<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:CompanyTheme_LayoutSwitcher:etc/layouts.xsd">
<layout id="header_layout_1" label="Header Layout 1" type="header" />
<layout id="header_layout_2" label="Header Layout 2" type="header" />
<layout id="header_layout_3" label="Header Layout 3" type="header" />
<layout id="header_layout_4" label="Header Layout 4" type="header" />
<layout id="header_layout_5" label="Header Layout 5" type="header" />
</config>


I want to add a sixth layout. For the moment I have modified this file directly to add a line (layout 6), but I know that this is not correct because the changes I made will disappear the next time I update the code that does not belong to me.



I searched but I don't know if it is possible to override this kind of file. If so, please give me some hints or on the contrary confirm that we can't...







php layout xml magento2.3.1






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited May 16 at 14:15







arno

















asked May 16 at 13:56









arnoarno

1598




1598












  • See that answer it can help you An response here

    – n44s
    May 16 at 14:16

















  • See that answer it can help you An response here

    – n44s
    May 16 at 14:16
















See that answer it can help you An response here

– n44s
May 16 at 14:16





See that answer it can help you An response here

– n44s
May 16 at 14:16










2 Answers
2






active

oldest

votes


















0














If you have created a child theme, You can override the file by copying the file to below location




app/design/frontend/YourVendor/Module/CompanyTheme_LayoutSwitcher/layout/layouts.xml




and add a sixth layout or any customization you need






share|improve this answer






























    0














    basically, you need to create a child theme, so if any update come then no effect on your theme.



    and also use git so you can track the whole summary.






    share|improve this answer























      Your Answer








      StackExchange.ready(function()
      var channelOptions =
      tags: "".split(" "),
      id: "479"
      ;
      initTagRenderer("".split(" "), "".split(" "), channelOptions);

      StackExchange.using("externalEditor", function()
      // Have to fire editor after snippets, if snippets enabled
      if (StackExchange.settings.snippets.snippetsEnabled)
      StackExchange.using("snippets", function()
      createEditor();
      );

      else
      createEditor();

      );

      function createEditor()
      StackExchange.prepareEditor(
      heartbeatType: 'answer',
      autoActivateHeartbeat: false,
      convertImagesToLinks: false,
      noModals: true,
      showLowRepImageUploadWarning: true,
      reputationToPostImages: null,
      bindNavPrevention: true,
      postfix: "",
      imageUploader:
      brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
      contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
      allowUrls: true
      ,
      onDemand: true,
      discardSelector: ".discard-answer"
      ,immediatelyShowMarkdownHelp:true
      );



      );













      draft saved

      draft discarded


















      StackExchange.ready(
      function ()
      StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f274917%2fmagento-2-3-how-to-override-the-custom-themes-etc-layouts-xml-file-in-recommend%23new-answer', 'question_page');

      );

      Post as a guest















      Required, but never shown

























      2 Answers
      2






      active

      oldest

      votes








      2 Answers
      2






      active

      oldest

      votes









      active

      oldest

      votes






      active

      oldest

      votes









      0














      If you have created a child theme, You can override the file by copying the file to below location




      app/design/frontend/YourVendor/Module/CompanyTheme_LayoutSwitcher/layout/layouts.xml




      and add a sixth layout or any customization you need






      share|improve this answer



























        0














        If you have created a child theme, You can override the file by copying the file to below location




        app/design/frontend/YourVendor/Module/CompanyTheme_LayoutSwitcher/layout/layouts.xml




        and add a sixth layout or any customization you need






        share|improve this answer

























          0












          0








          0







          If you have created a child theme, You can override the file by copying the file to below location




          app/design/frontend/YourVendor/Module/CompanyTheme_LayoutSwitcher/layout/layouts.xml




          and add a sixth layout or any customization you need






          share|improve this answer













          If you have created a child theme, You can override the file by copying the file to below location




          app/design/frontend/YourVendor/Module/CompanyTheme_LayoutSwitcher/layout/layouts.xml




          and add a sixth layout or any customization you need







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered May 16 at 13:59









          aravindaravind

          399113




          399113























              0














              basically, you need to create a child theme, so if any update come then no effect on your theme.



              and also use git so you can track the whole summary.






              share|improve this answer



























                0














                basically, you need to create a child theme, so if any update come then no effect on your theme.



                and also use git so you can track the whole summary.






                share|improve this answer

























                  0












                  0








                  0







                  basically, you need to create a child theme, so if any update come then no effect on your theme.



                  and also use git so you can track the whole summary.






                  share|improve this answer













                  basically, you need to create a child theme, so if any update come then no effect on your theme.



                  and also use git so you can track the whole summary.







                  share|improve this answer












                  share|improve this answer



                  share|improve this answer










                  answered May 16 at 13:59









                  Sunil PatelSunil Patel

                  1,5231612




                  1,5231612



























                      draft saved

                      draft discarded
















































                      Thanks for contributing an answer to Magento Stack Exchange!


                      • Please be sure to answer the question. Provide details and share your research!

                      But avoid


                      • Asking for help, clarification, or responding to other answers.

                      • Making statements based on opinion; back them up with references or personal experience.

                      To learn more, see our tips on writing great answers.




                      draft saved


                      draft discarded














                      StackExchange.ready(
                      function ()
                      StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f274917%2fmagento-2-3-how-to-override-the-custom-themes-etc-layouts-xml-file-in-recommend%23new-answer', 'question_page');

                      );

                      Post as a guest















                      Required, but never shown





















































                      Required, but never shown














                      Required, but never shown












                      Required, but never shown







                      Required, but never shown

































                      Required, but never shown














                      Required, but never shown












                      Required, but never shown







                      Required, but never shown







                      Popular posts from this blog

                      Grendel Contents Story Scholarship Depictions Notes References Navigation menu10.1093/notesj/gjn112Berserkeree

                      Area configuration aggregation error after install Porto themeMagento 2.1 CE Installed but front/backend not loading/workingCSS not loading on page within Magento 2 pageCannot install module in Magento 2no commands defined in the “setup” namespace. in Magento2Magento 2: Static files are present but shows 404Why do i have to always run the commands to clean cache in Magento 2.1.8?Failure reason: 'Unable to unserialize value.'Error 500 after magento migrationIn production mode the site does not loadMagento 2 : Error 500 after installing

                      Middle Expansion Olielle Resaix Definition: Uttering songs of triumph shouting with joy triumphant exulting Sejunction Journal 붙다 달 고급 품목 외출 The stretch trades the screeching tin. Definition: The act of speaking with a drawl a drawl Cough Sand Definition: An uproar a quarrel a noisy outbreak Shake Iron Publicize Horse House Baby 사과 Resaix Flaggy Jelly Temporary Unequaled Puppet A drop in the bucket Shrew 성격 회원 성질 미팅 The burn frames the tacky quality. Materialistic The smoke reduces the way. Yammoe Nondescript Cheek 얼굴 배 약하다 날리다 타다 The illegal country shows the iron. Help Rule Drearien Smoke Teaching Meaty Wasp Abraham Lincoln Jaws 진심 수리하다 Size Cork Idea Convert Think Lark John Lennon 거울 청소 군 추천하다 아이스크림