AD0-E720 practice question 10 of 10
An Adobe Commerce developer wants to override the following Layout XML file in the theme ExampleCorp/orange. app/design/frontend/ExampleCorp/blank/Vendor_Module/layout/catalog_product_view.xml What path would the developer use inside the layout directory of the theme to override the file?
Full set: 50 questionsTo override a layout XML file from a module or a parent theme, Adobe Commerce requires creating a file with the exact same name in the corresponding path within the target theme's directory. The original file is located at app/design/frontend/ExampleCorp/blank/VendorModule/layout/catalogproductview.xml. To override this in the ExampleCorp/orange theme, the new file must be placed at app/design/frontend/ExampleCorp/orange/VendorModule/layout/catalogproductview.xml. The question asks for the path inside the layout directory (.../VendorModule/layout/), which is simply the filename itself: catalogproductview.xml.
A. The override directory is not used for replacing layout files via this method; it is used for extending layouts or overriding templates, not for a direct file replacement of a layout XML.
B. The override/theme directory is used for extending a specific theme's layout files, not for a direct file replacement as required by the scenario.
1. Adobe Commerce Developer Documentation, Frontend Developer Guide, Layouts, Override a layout:
Section: Override a module layout: "To override a module layout, you need to put the layout file in the following location: //layout/.xml". This confirms the required directory structure for the overriding file.
Section: Override a theme layout: "To override a theme layout, you need to put the layout file in the following location: //layout/.xml". This shows the same principle applies when overriding a file that already exists in another theme. The path relative to the theme root must be identical. This supports that the new file is catalogproductview.xml placed inside the .../VendorModule/layout/ directory.
Keep practicing
Take the free AD0-E720 practice test
Ten exam-style questions with answers and explanations, plus the exam facts and study guides.
More questions
Other AD0-E720 practice questions
- Question 1An Adobe Commerce developer is trying to remove a block using the
- Question 3An Adobe Commerce developer wants to completely overwrite _module. less of Orange_Checkou…
- Question 5An Adobe Commerce developer wants to apply a knockout binding to ato run a function, onCl…
- Question 6An Adobe Commerce developer needs to modify the width and height of all product images in…
- Question 8An Adobe Commerce developer wants to remove the default Wishlist and Compare Products blo…
- Question 9An Adobe Commerce developer is customizing buttons for a custom theme that inherits Magen…
