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 />

• Theme override files replaced<br />

Source: vendor/magento/framework/View/File/Collector/Base.php<br />

How can merging remove elements added earlier?<br />

The only way to remove elements added earlier is through the remove attribute on<br />

the referenceBlock or referenceContainer tags:<br />

<br />

What are additive changes and what are overriding changes<br />

during layout merging?<br />

Additive changes are when you create new XML elements that are in addition to<br />

what has already been written. These changes will likely affect existing elements<br />

(setting new arguments, for example).<br />

Let’s look at an example from Magento_Catalog/view/<strong>frontend</strong>/layout/<br />

catalog_product_view.xml. Locate the product.attributes block in this<br />

file:<br />

<br />

<br />

More Information<br />

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

40

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

Saved successfully!

Ooh no, something went wrong!