Magento 2 : Override layout.xml File Within Custom Module Planned maintenance scheduled April 17/18, 2019 at 00:00UTC (8:00pm US/Eastern) Announcing the arrival of Valued Associate #679: Cesar Manara Unicorn Meta Zoo #1: Why another podcast?Magento2 extend layout from vendor folderwhere is declared layout xml file in module?Magento 2 html file and phtml file in custom template process?Magento 2 Override Shipping TemplateHow to properly override a core JS file in Magento2Magento 2: How to override core js module price-bundle.jsMagento 2.1: how to remove argument and/or argument item from block?Magento 2: Admin theme installationHow to override magento theme layout fileConditionally block all module output

Doubts about chords

What's the purpose of writing one's academic bio in 3rd person?

How to motivate offshore teams and trust them to deliver?

Is it true that "carbohydrates are of no use for the basal metabolic need"?

Models of set theory where not every set can be linearly ordered

Does surprise arrest existing movement?

List *all* the tuples!

Is the Standard Deduction better than Itemized when both are the same amount?

Is there a service that would inform me whenever a new direct route is scheduled from a given airport?

Stars Make Stars

Disable hyphenation for an entire paragraph

ListPlot join points by nearest neighbor rather than order

Did Xerox really develop the first LAN?

I am not a queen, who am I?

Why aren't air breathing engines used as small first stages

Why one of virtual NICs called bond0?

What are 'alternative tunings' of a guitar and why would you use them? Doesn't it make it more difficult to play?

Java 8 stream max() function argument type Comparator vs Comparable

Why don't the Weasley twins use magic outside of school if the Trace can only find the location of spells cast?

"Seemed to had" is it correct?

Did Kevin spill real chili?

How widely used is the term Treppenwitz? Is it something that most Germans know?

How to bypass password on Windows XP account?

Bonus calculation: Am I making a mountain out of a molehill?



Magento 2 : Override layout.xml File Within Custom Module



Planned maintenance scheduled April 17/18, 2019 at 00:00UTC (8:00pm US/Eastern)
Announcing the arrival of Valued Associate #679: Cesar Manara
Unicorn Meta Zoo #1: Why another podcast?Magento2 extend layout from vendor folderwhere is declared layout xml file in module?Magento 2 html file and phtml file in custom template process?Magento 2 Override Shipping TemplateHow to properly override a core JS file in Magento2Magento 2: How to override core js module price-bundle.jsMagento 2.1: how to remove argument and/or argument item from block?Magento 2: Admin theme installationHow to override magento theme layout fileConditionally block all module output



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








0















Looking at the Magento 2 docs, you can override a base/core layout.xml file - http://devdocs.magento.com/guides/v2.0/frontend-dev-guide/layouts/layout-override.html



Is it possible, to overide within a module rather than theme?



Alternatively, is it possible to bundle a theme within a module and extend that (and multiple other themes from multiple other modules) from the main website theme?










share|improve this question
















bumped to the homepage by Community yesterday


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.





















    0















    Looking at the Magento 2 docs, you can override a base/core layout.xml file - http://devdocs.magento.com/guides/v2.0/frontend-dev-guide/layouts/layout-override.html



    Is it possible, to overide within a module rather than theme?



    Alternatively, is it possible to bundle a theme within a module and extend that (and multiple other themes from multiple other modules) from the main website theme?










    share|improve this question
















    bumped to the homepage by Community yesterday


    This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.

















      0












      0








      0








      Looking at the Magento 2 docs, you can override a base/core layout.xml file - http://devdocs.magento.com/guides/v2.0/frontend-dev-guide/layouts/layout-override.html



      Is it possible, to overide within a module rather than theme?



      Alternatively, is it possible to bundle a theme within a module and extend that (and multiple other themes from multiple other modules) from the main website theme?










      share|improve this question
















      Looking at the Magento 2 docs, you can override a base/core layout.xml file - http://devdocs.magento.com/guides/v2.0/frontend-dev-guide/layouts/layout-override.html



      Is it possible, to overide within a module rather than theme?



      Alternatively, is it possible to bundle a theme within a module and extend that (and multiple other themes from multiple other modules) from the main website theme?







      magento2 module layout overrides






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Jan 24 '17 at 13:30









      Dhiren Vasoya

      4,43951844




      4,43951844










      asked Jan 24 '17 at 13:23









      minlareminlare

      405615




      405615





      bumped to the homepage by Community yesterday


      This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.







      bumped to the homepage by Community yesterday


      This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.






















          2 Answers
          2






          active

          oldest

          votes


















          0














          It is the same as with with theme layout but you have copy layout xml file in your layout directory.



          Namespace/Moduelname/view/frontend/layout/catalog_product_view.xml





          share|improve this answer




















          • 1





            If I put the xml file in Namespace/Moduelname/view/frontend/layout/override/base/catalog_product_view.xml it does not override it. I can extend the layout by placing it in the path you suggested, but I am looking for an override NOT extend

            – minlare
            Jan 24 '17 at 14:04











          • Won't that just extend the XML?

            – Ben Crook
            Feb 1 '17 at 17:11











          • @BenCrook it's extend the layout

            – Qaisar Satti
            Feb 2 '17 at 4:31


















          0














          When load, Magento will load all the XML files which have same name and merge them. If you want to override, you have to remove all the element of core layout in you XML file.Use this:



          <referenceContainer name="container-name" remove="true"/>//with container
          <referenceBlock name="block-name" remove="true"/>//with block





          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%2f156210%2fmagento-2-override-layout-xml-file-within-custom-module%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














            It is the same as with with theme layout but you have copy layout xml file in your layout directory.



            Namespace/Moduelname/view/frontend/layout/catalog_product_view.xml





            share|improve this answer




















            • 1





              If I put the xml file in Namespace/Moduelname/view/frontend/layout/override/base/catalog_product_view.xml it does not override it. I can extend the layout by placing it in the path you suggested, but I am looking for an override NOT extend

              – minlare
              Jan 24 '17 at 14:04











            • Won't that just extend the XML?

              – Ben Crook
              Feb 1 '17 at 17:11











            • @BenCrook it's extend the layout

              – Qaisar Satti
              Feb 2 '17 at 4:31















            0














            It is the same as with with theme layout but you have copy layout xml file in your layout directory.



            Namespace/Moduelname/view/frontend/layout/catalog_product_view.xml





            share|improve this answer




















            • 1





              If I put the xml file in Namespace/Moduelname/view/frontend/layout/override/base/catalog_product_view.xml it does not override it. I can extend the layout by placing it in the path you suggested, but I am looking for an override NOT extend

              – minlare
              Jan 24 '17 at 14:04











            • Won't that just extend the XML?

              – Ben Crook
              Feb 1 '17 at 17:11











            • @BenCrook it's extend the layout

              – Qaisar Satti
              Feb 2 '17 at 4:31













            0












            0








            0







            It is the same as with with theme layout but you have copy layout xml file in your layout directory.



            Namespace/Moduelname/view/frontend/layout/catalog_product_view.xml





            share|improve this answer















            It is the same as with with theme layout but you have copy layout xml file in your layout directory.



            Namespace/Moduelname/view/frontend/layout/catalog_product_view.xml






            share|improve this answer














            share|improve this answer



            share|improve this answer








            edited Feb 1 '17 at 16:43









            Christopher Hackett

            19313




            19313










            answered Jan 24 '17 at 13:29









            Qaisar SattiQaisar Satti

            27.1k1256109




            27.1k1256109







            • 1





              If I put the xml file in Namespace/Moduelname/view/frontend/layout/override/base/catalog_product_view.xml it does not override it. I can extend the layout by placing it in the path you suggested, but I am looking for an override NOT extend

              – minlare
              Jan 24 '17 at 14:04











            • Won't that just extend the XML?

              – Ben Crook
              Feb 1 '17 at 17:11











            • @BenCrook it's extend the layout

              – Qaisar Satti
              Feb 2 '17 at 4:31












            • 1





              If I put the xml file in Namespace/Moduelname/view/frontend/layout/override/base/catalog_product_view.xml it does not override it. I can extend the layout by placing it in the path you suggested, but I am looking for an override NOT extend

              – minlare
              Jan 24 '17 at 14:04











            • Won't that just extend the XML?

              – Ben Crook
              Feb 1 '17 at 17:11











            • @BenCrook it's extend the layout

              – Qaisar Satti
              Feb 2 '17 at 4:31







            1




            1





            If I put the xml file in Namespace/Moduelname/view/frontend/layout/override/base/catalog_product_view.xml it does not override it. I can extend the layout by placing it in the path you suggested, but I am looking for an override NOT extend

            – minlare
            Jan 24 '17 at 14:04





            If I put the xml file in Namespace/Moduelname/view/frontend/layout/override/base/catalog_product_view.xml it does not override it. I can extend the layout by placing it in the path you suggested, but I am looking for an override NOT extend

            – minlare
            Jan 24 '17 at 14:04













            Won't that just extend the XML?

            – Ben Crook
            Feb 1 '17 at 17:11





            Won't that just extend the XML?

            – Ben Crook
            Feb 1 '17 at 17:11













            @BenCrook it's extend the layout

            – Qaisar Satti
            Feb 2 '17 at 4:31





            @BenCrook it's extend the layout

            – Qaisar Satti
            Feb 2 '17 at 4:31













            0














            When load, Magento will load all the XML files which have same name and merge them. If you want to override, you have to remove all the element of core layout in you XML file.Use this:



            <referenceContainer name="container-name" remove="true"/>//with container
            <referenceBlock name="block-name" remove="true"/>//with block





            share|improve this answer



























              0














              When load, Magento will load all the XML files which have same name and merge them. If you want to override, you have to remove all the element of core layout in you XML file.Use this:



              <referenceContainer name="container-name" remove="true"/>//with container
              <referenceBlock name="block-name" remove="true"/>//with block





              share|improve this answer

























                0












                0








                0







                When load, Magento will load all the XML files which have same name and merge them. If you want to override, you have to remove all the element of core layout in you XML file.Use this:



                <referenceContainer name="container-name" remove="true"/>//with container
                <referenceBlock name="block-name" remove="true"/>//with block





                share|improve this answer













                When load, Magento will load all the XML files which have same name and merge them. If you want to override, you have to remove all the element of core layout in you XML file.Use this:



                <referenceContainer name="container-name" remove="true"/>//with container
                <referenceBlock name="block-name" remove="true"/>//with block






                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered Dec 9 '17 at 2:17









                Nero PhungNero Phung

                9021620




                9021620



























                    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%2f156210%2fmagento-2-override-layout-xml-file-within-custom-module%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

                    Get product attribute by attribute group code in magento 2get product attribute by product attribute group in magento 2Magento 2 Log Bundle Product Data in List Page?How to get all product attribute of a attribute group of Default attribute set?Magento 2.1 Create a filter in the product grid by new attributeMagento 2 : Get Product Attribute values By GroupMagento 2 How to get all existing values for one attributeMagento 2 get custom attribute of a single product inside a pluginMagento 2.3 How to get all the Multi Source Inventory (MSI) locations collection in custom module?Magento2: how to develop rest API to get new productsGet product attribute by attribute group code ( [attribute_group_code] ) in magento 2

                    Category:9 (number) SubcategoriesMedia in category "9 (number)"Navigation menuUpload mediaGND ID: 4485639-8Library of Congress authority ID: sh85091979ReasonatorScholiaStatistics

                    Magento 2.3: How do i solve this, Not registered handle, on custom form?How can i rewrite TierPrice Block in Magento2magento 2 captcha not rendering if I override layout xmlmain.CRITICAL: Plugin class doesn't existMagento 2 : Problem while adding custom button order view page?Magento 2.2.5: Overriding Admin Controller sales/orderMagento 2.2.5: Add, Update and Delete existing products Custom OptionsMagento 2.3 : File Upload issue in UI Component FormMagento2 Not registered handleHow to configured Form Builder Js in my custom magento 2.3.0 module?Magento 2.3. How to create image upload field in an admin form