04.07.2019 Views

frontend-developer-1

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Layout XML in Themes<br />

In what order is layout XML merged within the same handle?<br />

This would then be according to the order in which the layout files are loaded. See<br />

the in-depth topic on section 3.6.<br />

How can the processing order be influenced?<br />

The processing order and merging of layout XML is determined by the module<br />

load order. Adjusting the setting for modules will influence the<br />

processing order of layout XML.<br />

For backend <strong>developer</strong>s, you can use plugins to inject your layout handles earlier in<br />

the process. For example, if you want to add a layout handle before the catalog_<br />

product_view one, you need to create a before plugin for \Magento\<br />

Catalog\Helper\Product\View::initProductLayout.<br />

What are common problems arising from the merge order of<br />

layout declarations?<br />

The most common problems are:<br />

• Accidental overrides: where you specify which<br />

happens to be the same name as another block.<br />

• Wishful overrides: where you want to override another block, but you specify<br />

a different name and the block is injected twice.<br />

Copyright © 2018, SwiftOtter, Inc.<br />

43

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!