Skip to content
This repository was archived by the owner on Nov 19, 2024. It is now read-only.

Commit ed7ca15

Browse files
change layout file order
1 parent b2e11e4 commit ed7ca15

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

src/guides/v2.3/frontend-dev-guide/themes/theme-inherit.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -130,13 +130,13 @@ You can find out what exactly code changes are required to perform this and othe
130130

131131
The layouts processing mechanism does not involve fallback. The system collects [layout](https://glossary.magento.com/layout) files in the following order:
132132

133-
1. All modules layout files in sequence defined in `app/etc/config.php` respecting the [component load order]({{ page.baseurl }}/extension-dev-guide/build/module-load-order.html). For each module:
133+
1. Current theme layouts: `<theme_dir>/<Vendor>_<Module>/layout/`
134134

135-
* Layout files for the `base` area: `<module_dir>/view/base/layout/`
136-
* Layout files for the `frontend` area: `<module_dir>/view/frontend/layout/`
135+
1. Ancestor themes layouts, starting from the most distant ancestor, recursively until a theme with no parent is reached: `<parent_theme_dir>/<Vendor>_<Module>/layout/`
137136

138-
1. Ancestor theme layouts, starting from the most distant ancestor, recursively until a theme with no child is reached: `<parent_theme_dir>/<Vendor>_<Module>/layout/`
139-
1. Current theme layouts: `<theme_dir>/<Vendor>_<Module>/layout/`
137+
1. All modules layout files in sequence defined in app/etc/config.php respecting the component load order. For each module:
138+
* Layout files for the `base` area: `<module_dir>/view/base/layout/`
139+
* Layout files for the `frontend` area: `<module_dir>/view/frontend/layout/`
140140

141141
Unlike templates or images, layout can be not only overridden, but also extended. And the recommended way to customize layout is to extend it by creating theme extending layout files.
142142

@@ -146,13 +146,13 @@ To add an extending layout file:
146146

147147
**Example:**
148148

149-
OrangeCo decided they should remove the "Report bugs" link from the footer, defined in `<Magento_Theme_module_dir>/view/frontend/layout/default.xml`
149+
OrangeCo decided they should remove the "copyright" from the footer, defined in `<Magento_Theme_module_dir>/view/frontend/layout/default.xml`
150150
To do this, they added an extending layout in `app/design/frontend/OrangeCo/orange/Magento_Theme/layout/default.xml` :
151151

152152
```xml
153153
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
154154
<body>
155-
<referenceBlock name="report.bugs" remove="true"/>
155+
<referenceBlock name="copyright" remove="true"/>
156156
</body>
157157
</page>
158158
```

0 commit comments

Comments
 (0)