Magento 2 Difference between default.xml and default_head_blocks.xmlMagento2: what is the difference between referenceContainer and referenceBlockRemove header part and add new header from my custom module magento 2.0.1?Custom layout changes are not visible on frontend in mangeto 2how to load or add js before require js in magento 2Magento2: What is the difference between referenceContainer and reference?What is the difference between base_grand_total and base_total_invoiced?Difference between the API interfaces in Api and Api/data folders?Difference between module-layered-navigation-staging and module-layered-navigationMagento2 What is the difference between uiCollection and uiComponentDifference between Extend a layout and Override layout

Animation: customize bounce interpolation

What is the smallest number n> 5 so that 5 ^ n ends with "3125"?

Ways of geometrical multiplication

Grepping string, but include all non-blank lines following each grep match

ContourPlot — How do I color by contour curvature?

How to I force windows to use a specific version of SQLCMD?

Echo with obfuscation

How to reduce predictors the right way for a logistic regression model

How to write Quadratic equation with negative coefficient

Is there a reason to prefer HFS+ over APFS for disk images in High Sierra and/or Mojave?

Should a narrator ever describe things based on a character's view instead of facts?

Giving feedback to someone without sounding prejudiced

How to make a list of partial sums using forEach

Do I have to know the General Relativity theory to understand the concept of inertial frame?

How to test the sharpness of a knife?

Do I have to take mana from my deck or hand when tapping a dual land?

Why does the Persian emissary display a string of crowned skulls?

How to leave product feedback on macOS?

Does Doodling or Improvising on the Piano Have Any Benefits?

What happens if I try to grapple an illusory duplicate from the Mirror Image spell?

Should I warn a new PhD Student?

Can I say "fingers" when referring to toes?

"Oh no!" in Latin

In One Punch Man, is King actually weak?



Magento 2 Difference between default.xml and default_head_blocks.xml


Magento2: what is the difference between referenceContainer and referenceBlockRemove header part and add new header from my custom module magento 2.0.1?Custom layout changes are not visible on frontend in mangeto 2how to load or add js before require js in magento 2Magento2: What is the difference between referenceContainer and reference?What is the difference between base_grand_total and base_total_invoiced?Difference between the API interfaces in Api and Api/data folders?Difference between module-layered-navigation-staging and module-layered-navigationMagento2 What is the difference between uiCollection and uiComponentDifference between Extend a layout and Override layout













2















In Magento 2 Theme , default.xml and default_head_blocks.xml files are located in appdesignfrontendpackagethemeMagento_Themelayout



can anyone tell me what is the difference between these two files ?










share|improve this question
















bumped to the homepage by Community 5 mins ago


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



















    2















    In Magento 2 Theme , default.xml and default_head_blocks.xml files are located in appdesignfrontendpackagethemeMagento_Themelayout



    can anyone tell me what is the difference between these two files ?










    share|improve this question
















    bumped to the homepage by Community 5 mins ago


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

















      2












      2








      2








      In Magento 2 Theme , default.xml and default_head_blocks.xml files are located in appdesignfrontendpackagethemeMagento_Themelayout



      can anyone tell me what is the difference between these two files ?










      share|improve this question
















      In Magento 2 Theme , default.xml and default_head_blocks.xml files are located in appdesignfrontendpackagethemeMagento_Themelayout



      can anyone tell me what is the difference between these two files ?







      magento2






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Sep 13 '18 at 9:42









      Manashvi Birla

      6,40751841




      6,40751841










      asked Sep 13 '18 at 9:33









      Sanjay ShiyalSanjay Shiyal

      412




      412





      bumped to the homepage by Community 5 mins ago


      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 5 mins ago


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






















          3 Answers
          3






          active

          oldest

          votes


















          0














          The basic view of all Magento storefront pages in defined in two page configuration layout files located in the Magento_Theme module:



          1) <Magento_Theme_module_dir>/view/frontend/layout/default.xml: defines the page layout.



          2) <Magento_Theme_module_dir>/view/frontend/layout/default_head_blocks.xml: defines the scripts, images, and meta data included in pages’ <head> section.



          These basic page configuration layouts are extended in other Magento modules and in Magento themes.



          You can also extend or override these files in your custom theme.



          REF https://devdocs.magento.com/guides/v2.0/frontend-dev-guide/layouts/layout-overview.html






          share|improve this answer























          • Thanks for you answer,but we can also define head section in default.xml so why concept of default_head_blocks.xml has come

            – Sanjay Shiyal
            Sep 13 '18 at 9:47


















          0














          default_head_blocks.xml is a specific layout of head section, and this file is called in default.xml : <update handle="default_head_blocks"/> so if you want to add in head section css, javascript, static assets, The recommended way is to add them in default_head_blocks.xml.



          You can very well add them in default.xml one and it works, but your code you will not be pretty as Magento do, Since we use Magento, we should apply the recommended way.




          JavaScript, CSS and other static assets are added in the
          section of a page configuration file. The default look of a Magento
          store page is defined by
          app/code/Magento/Theme/view/frontend/layout/default_head_blocks.xml.
          The recommended way to add CSS and JavaScript is to extend this file
          in your custom theme, and add the assets there.







          share|improve this answer






























            0















            default.xml: defines the page layout.



            default_head_blocks.xml: defines the scripts, images, and meta data
            included in pages’ section.




            You can read more deep on it from magento doc enter link description here



            Example of default_head_blocks.html




            app/design/frontend/Vendor/theme/Magento_Theme/layout/default_head_blocks.xml




            <page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
            <head>
            <!-- Add local resources -->
            <css src="css/my-styles.css"/>

            <!-- The following two ways to add local JavaScript files are equal -->
            <script src="Magento_Catalog::js/sample1.js"/>
            <link src="js/sample.js"/>

            <!-- Add external resources -->
            <css src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/css/bootstrap-theme.min.css" src_type="url" />
            <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/js/bootstrap.min.js" src_type="url" />
            <link rel="stylesheet" type="text/css" src="http://fonts.googleapis.com/css?family=Montserrat" src_type="url" />
            </head>
            </page>


            Example of default.xml




            app/code/Magento/Catalog/view/frontend/layout/default.xml




            <page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
            <body>
            ...
            <referenceContainer name="sidebar.additional">
            <block class="MagentoCatalogBlockProductCompareSidebar" name="catalog.compare.sidebar" template="product/compare/sidebar.phtml"/>
            </referenceContainer>
            ...
            </body>
            </page>





            share|improve this answer

























            • Thanks for replay but we can also use head section in default.xml also so why default_head_blocks.xml concept has come.

              – Sanjay Shiyal
              Sep 13 '18 at 9:52











            • When you will add js and css using default_head_blocks.xm it will be add for all pages and in default.xml with in every module head will be for that module specific

              – Ansar Husain
              Sep 13 '18 at 9:54











            • like as some thing you want to add in head for catalog section only then you will use default.xml inside Magento_Catalog.

              – Ansar Husain
              Sep 13 '18 at 9:56










            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%2f242081%2fmagento-2-difference-between-default-xml-and-default-head-blocks-xml%23new-answer', 'question_page');

            );

            Post as a guest















            Required, but never shown

























            3 Answers
            3






            active

            oldest

            votes








            3 Answers
            3






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes









            0














            The basic view of all Magento storefront pages in defined in two page configuration layout files located in the Magento_Theme module:



            1) <Magento_Theme_module_dir>/view/frontend/layout/default.xml: defines the page layout.



            2) <Magento_Theme_module_dir>/view/frontend/layout/default_head_blocks.xml: defines the scripts, images, and meta data included in pages’ <head> section.



            These basic page configuration layouts are extended in other Magento modules and in Magento themes.



            You can also extend or override these files in your custom theme.



            REF https://devdocs.magento.com/guides/v2.0/frontend-dev-guide/layouts/layout-overview.html






            share|improve this answer























            • Thanks for you answer,but we can also define head section in default.xml so why concept of default_head_blocks.xml has come

              – Sanjay Shiyal
              Sep 13 '18 at 9:47















            0














            The basic view of all Magento storefront pages in defined in two page configuration layout files located in the Magento_Theme module:



            1) <Magento_Theme_module_dir>/view/frontend/layout/default.xml: defines the page layout.



            2) <Magento_Theme_module_dir>/view/frontend/layout/default_head_blocks.xml: defines the scripts, images, and meta data included in pages’ <head> section.



            These basic page configuration layouts are extended in other Magento modules and in Magento themes.



            You can also extend or override these files in your custom theme.



            REF https://devdocs.magento.com/guides/v2.0/frontend-dev-guide/layouts/layout-overview.html






            share|improve this answer























            • Thanks for you answer,but we can also define head section in default.xml so why concept of default_head_blocks.xml has come

              – Sanjay Shiyal
              Sep 13 '18 at 9:47













            0












            0








            0







            The basic view of all Magento storefront pages in defined in two page configuration layout files located in the Magento_Theme module:



            1) <Magento_Theme_module_dir>/view/frontend/layout/default.xml: defines the page layout.



            2) <Magento_Theme_module_dir>/view/frontend/layout/default_head_blocks.xml: defines the scripts, images, and meta data included in pages’ <head> section.



            These basic page configuration layouts are extended in other Magento modules and in Magento themes.



            You can also extend or override these files in your custom theme.



            REF https://devdocs.magento.com/guides/v2.0/frontend-dev-guide/layouts/layout-overview.html






            share|improve this answer













            The basic view of all Magento storefront pages in defined in two page configuration layout files located in the Magento_Theme module:



            1) <Magento_Theme_module_dir>/view/frontend/layout/default.xml: defines the page layout.



            2) <Magento_Theme_module_dir>/view/frontend/layout/default_head_blocks.xml: defines the scripts, images, and meta data included in pages’ <head> section.



            These basic page configuration layouts are extended in other Magento modules and in Magento themes.



            You can also extend or override these files in your custom theme.



            REF https://devdocs.magento.com/guides/v2.0/frontend-dev-guide/layouts/layout-overview.html







            share|improve this answer












            share|improve this answer



            share|improve this answer










            answered Sep 13 '18 at 9:44









            Manashvi BirlaManashvi Birla

            6,40751841




            6,40751841












            • Thanks for you answer,but we can also define head section in default.xml so why concept of default_head_blocks.xml has come

              – Sanjay Shiyal
              Sep 13 '18 at 9:47

















            • Thanks for you answer,but we can also define head section in default.xml so why concept of default_head_blocks.xml has come

              – Sanjay Shiyal
              Sep 13 '18 at 9:47
















            Thanks for you answer,but we can also define head section in default.xml so why concept of default_head_blocks.xml has come

            – Sanjay Shiyal
            Sep 13 '18 at 9:47





            Thanks for you answer,but we can also define head section in default.xml so why concept of default_head_blocks.xml has come

            – Sanjay Shiyal
            Sep 13 '18 at 9:47













            0














            default_head_blocks.xml is a specific layout of head section, and this file is called in default.xml : <update handle="default_head_blocks"/> so if you want to add in head section css, javascript, static assets, The recommended way is to add them in default_head_blocks.xml.



            You can very well add them in default.xml one and it works, but your code you will not be pretty as Magento do, Since we use Magento, we should apply the recommended way.




            JavaScript, CSS and other static assets are added in the
            section of a page configuration file. The default look of a Magento
            store page is defined by
            app/code/Magento/Theme/view/frontend/layout/default_head_blocks.xml.
            The recommended way to add CSS and JavaScript is to extend this file
            in your custom theme, and add the assets there.







            share|improve this answer



























              0














              default_head_blocks.xml is a specific layout of head section, and this file is called in default.xml : <update handle="default_head_blocks"/> so if you want to add in head section css, javascript, static assets, The recommended way is to add them in default_head_blocks.xml.



              You can very well add them in default.xml one and it works, but your code you will not be pretty as Magento do, Since we use Magento, we should apply the recommended way.




              JavaScript, CSS and other static assets are added in the
              section of a page configuration file. The default look of a Magento
              store page is defined by
              app/code/Magento/Theme/view/frontend/layout/default_head_blocks.xml.
              The recommended way to add CSS and JavaScript is to extend this file
              in your custom theme, and add the assets there.







              share|improve this answer

























                0












                0








                0







                default_head_blocks.xml is a specific layout of head section, and this file is called in default.xml : <update handle="default_head_blocks"/> so if you want to add in head section css, javascript, static assets, The recommended way is to add them in default_head_blocks.xml.



                You can very well add them in default.xml one and it works, but your code you will not be pretty as Magento do, Since we use Magento, we should apply the recommended way.




                JavaScript, CSS and other static assets are added in the
                section of a page configuration file. The default look of a Magento
                store page is defined by
                app/code/Magento/Theme/view/frontend/layout/default_head_blocks.xml.
                The recommended way to add CSS and JavaScript is to extend this file
                in your custom theme, and add the assets there.







                share|improve this answer













                default_head_blocks.xml is a specific layout of head section, and this file is called in default.xml : <update handle="default_head_blocks"/> so if you want to add in head section css, javascript, static assets, The recommended way is to add them in default_head_blocks.xml.



                You can very well add them in default.xml one and it works, but your code you will not be pretty as Magento do, Since we use Magento, we should apply the recommended way.




                JavaScript, CSS and other static assets are added in the
                section of a page configuration file. The default look of a Magento
                store page is defined by
                app/code/Magento/Theme/view/frontend/layout/default_head_blocks.xml.
                The recommended way to add CSS and JavaScript is to extend this file
                in your custom theme, and add the assets there.








                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered Sep 13 '18 at 10:04









                PЯINCƏPЯINCƏ

                8,33131143




                8,33131143





















                    0















                    default.xml: defines the page layout.



                    default_head_blocks.xml: defines the scripts, images, and meta data
                    included in pages’ section.




                    You can read more deep on it from magento doc enter link description here



                    Example of default_head_blocks.html




                    app/design/frontend/Vendor/theme/Magento_Theme/layout/default_head_blocks.xml




                    <page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
                    <head>
                    <!-- Add local resources -->
                    <css src="css/my-styles.css"/>

                    <!-- The following two ways to add local JavaScript files are equal -->
                    <script src="Magento_Catalog::js/sample1.js"/>
                    <link src="js/sample.js"/>

                    <!-- Add external resources -->
                    <css src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/css/bootstrap-theme.min.css" src_type="url" />
                    <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/js/bootstrap.min.js" src_type="url" />
                    <link rel="stylesheet" type="text/css" src="http://fonts.googleapis.com/css?family=Montserrat" src_type="url" />
                    </head>
                    </page>


                    Example of default.xml




                    app/code/Magento/Catalog/view/frontend/layout/default.xml




                    <page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
                    <body>
                    ...
                    <referenceContainer name="sidebar.additional">
                    <block class="MagentoCatalogBlockProductCompareSidebar" name="catalog.compare.sidebar" template="product/compare/sidebar.phtml"/>
                    </referenceContainer>
                    ...
                    </body>
                    </page>





                    share|improve this answer

























                    • Thanks for replay but we can also use head section in default.xml also so why default_head_blocks.xml concept has come.

                      – Sanjay Shiyal
                      Sep 13 '18 at 9:52











                    • When you will add js and css using default_head_blocks.xm it will be add for all pages and in default.xml with in every module head will be for that module specific

                      – Ansar Husain
                      Sep 13 '18 at 9:54











                    • like as some thing you want to add in head for catalog section only then you will use default.xml inside Magento_Catalog.

                      – Ansar Husain
                      Sep 13 '18 at 9:56















                    0















                    default.xml: defines the page layout.



                    default_head_blocks.xml: defines the scripts, images, and meta data
                    included in pages’ section.




                    You can read more deep on it from magento doc enter link description here



                    Example of default_head_blocks.html




                    app/design/frontend/Vendor/theme/Magento_Theme/layout/default_head_blocks.xml




                    <page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
                    <head>
                    <!-- Add local resources -->
                    <css src="css/my-styles.css"/>

                    <!-- The following two ways to add local JavaScript files are equal -->
                    <script src="Magento_Catalog::js/sample1.js"/>
                    <link src="js/sample.js"/>

                    <!-- Add external resources -->
                    <css src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/css/bootstrap-theme.min.css" src_type="url" />
                    <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/js/bootstrap.min.js" src_type="url" />
                    <link rel="stylesheet" type="text/css" src="http://fonts.googleapis.com/css?family=Montserrat" src_type="url" />
                    </head>
                    </page>


                    Example of default.xml




                    app/code/Magento/Catalog/view/frontend/layout/default.xml




                    <page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
                    <body>
                    ...
                    <referenceContainer name="sidebar.additional">
                    <block class="MagentoCatalogBlockProductCompareSidebar" name="catalog.compare.sidebar" template="product/compare/sidebar.phtml"/>
                    </referenceContainer>
                    ...
                    </body>
                    </page>





                    share|improve this answer

























                    • Thanks for replay but we can also use head section in default.xml also so why default_head_blocks.xml concept has come.

                      – Sanjay Shiyal
                      Sep 13 '18 at 9:52











                    • When you will add js and css using default_head_blocks.xm it will be add for all pages and in default.xml with in every module head will be for that module specific

                      – Ansar Husain
                      Sep 13 '18 at 9:54











                    • like as some thing you want to add in head for catalog section only then you will use default.xml inside Magento_Catalog.

                      – Ansar Husain
                      Sep 13 '18 at 9:56













                    0












                    0








                    0








                    default.xml: defines the page layout.



                    default_head_blocks.xml: defines the scripts, images, and meta data
                    included in pages’ section.




                    You can read more deep on it from magento doc enter link description here



                    Example of default_head_blocks.html




                    app/design/frontend/Vendor/theme/Magento_Theme/layout/default_head_blocks.xml




                    <page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
                    <head>
                    <!-- Add local resources -->
                    <css src="css/my-styles.css"/>

                    <!-- The following two ways to add local JavaScript files are equal -->
                    <script src="Magento_Catalog::js/sample1.js"/>
                    <link src="js/sample.js"/>

                    <!-- Add external resources -->
                    <css src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/css/bootstrap-theme.min.css" src_type="url" />
                    <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/js/bootstrap.min.js" src_type="url" />
                    <link rel="stylesheet" type="text/css" src="http://fonts.googleapis.com/css?family=Montserrat" src_type="url" />
                    </head>
                    </page>


                    Example of default.xml




                    app/code/Magento/Catalog/view/frontend/layout/default.xml




                    <page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
                    <body>
                    ...
                    <referenceContainer name="sidebar.additional">
                    <block class="MagentoCatalogBlockProductCompareSidebar" name="catalog.compare.sidebar" template="product/compare/sidebar.phtml"/>
                    </referenceContainer>
                    ...
                    </body>
                    </page>





                    share|improve this answer
















                    default.xml: defines the page layout.



                    default_head_blocks.xml: defines the scripts, images, and meta data
                    included in pages’ section.




                    You can read more deep on it from magento doc enter link description here



                    Example of default_head_blocks.html




                    app/design/frontend/Vendor/theme/Magento_Theme/layout/default_head_blocks.xml




                    <page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
                    <head>
                    <!-- Add local resources -->
                    <css src="css/my-styles.css"/>

                    <!-- The following two ways to add local JavaScript files are equal -->
                    <script src="Magento_Catalog::js/sample1.js"/>
                    <link src="js/sample.js"/>

                    <!-- Add external resources -->
                    <css src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/css/bootstrap-theme.min.css" src_type="url" />
                    <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/js/bootstrap.min.js" src_type="url" />
                    <link rel="stylesheet" type="text/css" src="http://fonts.googleapis.com/css?family=Montserrat" src_type="url" />
                    </head>
                    </page>


                    Example of default.xml




                    app/code/Magento/Catalog/view/frontend/layout/default.xml




                    <page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
                    <body>
                    ...
                    <referenceContainer name="sidebar.additional">
                    <block class="MagentoCatalogBlockProductCompareSidebar" name="catalog.compare.sidebar" template="product/compare/sidebar.phtml"/>
                    </referenceContainer>
                    ...
                    </body>
                    </page>






                    share|improve this answer














                    share|improve this answer



                    share|improve this answer








                    edited Sep 13 '18 at 10:06

























                    answered Sep 13 '18 at 9:44









                    Ansar HusainAnsar Husain

                    1,707218




                    1,707218












                    • Thanks for replay but we can also use head section in default.xml also so why default_head_blocks.xml concept has come.

                      – Sanjay Shiyal
                      Sep 13 '18 at 9:52











                    • When you will add js and css using default_head_blocks.xm it will be add for all pages and in default.xml with in every module head will be for that module specific

                      – Ansar Husain
                      Sep 13 '18 at 9:54











                    • like as some thing you want to add in head for catalog section only then you will use default.xml inside Magento_Catalog.

                      – Ansar Husain
                      Sep 13 '18 at 9:56

















                    • Thanks for replay but we can also use head section in default.xml also so why default_head_blocks.xml concept has come.

                      – Sanjay Shiyal
                      Sep 13 '18 at 9:52











                    • When you will add js and css using default_head_blocks.xm it will be add for all pages and in default.xml with in every module head will be for that module specific

                      – Ansar Husain
                      Sep 13 '18 at 9:54











                    • like as some thing you want to add in head for catalog section only then you will use default.xml inside Magento_Catalog.

                      – Ansar Husain
                      Sep 13 '18 at 9:56
















                    Thanks for replay but we can also use head section in default.xml also so why default_head_blocks.xml concept has come.

                    – Sanjay Shiyal
                    Sep 13 '18 at 9:52





                    Thanks for replay but we can also use head section in default.xml also so why default_head_blocks.xml concept has come.

                    – Sanjay Shiyal
                    Sep 13 '18 at 9:52













                    When you will add js and css using default_head_blocks.xm it will be add for all pages and in default.xml with in every module head will be for that module specific

                    – Ansar Husain
                    Sep 13 '18 at 9:54





                    When you will add js and css using default_head_blocks.xm it will be add for all pages and in default.xml with in every module head will be for that module specific

                    – Ansar Husain
                    Sep 13 '18 at 9:54













                    like as some thing you want to add in head for catalog section only then you will use default.xml inside Magento_Catalog.

                    – Ansar Husain
                    Sep 13 '18 at 9:56





                    like as some thing you want to add in head for catalog section only then you will use default.xml inside Magento_Catalog.

                    – Ansar Husain
                    Sep 13 '18 at 9:56

















                    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%2f242081%2fmagento-2-difference-between-default-xml-and-default-head-blocks-xml%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

                    Can not update quote_id field of “quote_item” table magento 2Magento 2.1 - We can't remove the item. (Shopping Cart doesnt allow us to remove items before becomes empty)Add value for custom quote item attribute using REST apiREST API endpoint v1/carts/cartId/items always returns error messageCorrect way to save entries to databaseHow to remove all associated quote objects of a customer completelyMagento 2 - Save value from custom input field to quote_itemGet quote_item data using quote id and product id filter in Magento 2How to set additional data to quote_item table from controller in Magento 2?What is the purpose of additional_data column in quote_item table in magento2Set Custom Price to Quote item magento2 from controller

                    Magento 2 disable Secret Key on URL's from terminal The Next CEO of Stack OverflowMagento 2 Shortcut/GUI tool to perform commandline tasks for windowsIn menu add configuration linkMagento oAuth : Generating access token and access secretMagento 2 security key issue in Third-Party API redirect URIPublic actions in admin controllersHow to Disable Cache in Custom WidgetURL Key not changing in Magento 2Product URL Key gets deleted when importing custom options - Magento 2Problem with reindex terminalMagento 2 - bin/magento Commands not working in Cpanel Terminal

                    Aasi (pallopeli) Navigointivalikko