AD0-E720 practice question 8 of 10
An Adobe Commerce developer wants to remove the default Wishlist and Compare Products blocks on a category page with layered navigation Where would this modification be placed, assuming the developer only wants to make this change?
Full set: 50 questionsThe question requires removing blocks specifically from category pages where layered navigation is active. Adobe Commerce uses a specific layout handle for this scenario: catalogcategoryviewtypelayered. To apply a layout modification for this specific view, a developer must create an extending layout file named catalogcategoryviewtypelayered.xml within their theme. This file allows for targeted changes, such as removing blocks using , that apply only to layered navigation category pages, fulfilling the requirement.
Note: While this option correctly identifies the specific layout file, the module directory path is technically incorrect. The catalogcategoryviewtypelayered.xml layout originates from the MagentoCatalog module, so the correct path should be within the MagentoCatalog directory. However, among the given choices, this is the only one that uses the correct, most specific layout file name.
A. The override directory is used to completely replace a base layout file from a parent theme or module, which is an unnecessarily drastic action for simply removing a block.
C. Using catalogcategoryview.xml is incorrect because it is too broad. This file would apply the changes to all category pages, not just those with layered navigation as specified.
1. Adobe Commerce Developer Documentation, Frontend Developer Guide, Layouts, Layout file types: This document specifies the convention for extending layouts. An extending layout file must be placed in app/design/frontend////layout/. The corresponds to the module where the original layout file is located.
Reference: Adobe Commerce Documentation > Frontend Developer Guide > Theming > Layouts > Layout file types.
2. Magento Open Source Codebase: The original layout file that defines the catalogcategoryviewtypelayered handle is located in the MagentoCatalog module.
Reference: vendor/magento/module-catalog/view/frontend/layout/catalogcategoryviewtypelayered.xml. This file's existence and location confirm that any extension should be placed in the theme's MagentoCatalog/layout directory.
3. Adobe Commerce Developer Documentation, Frontend Developer Guide, Layouts, Common layout customization tasks: This section details how to remove blocks using layout XML. The instruction is the standard method used within an extending layout file like catalogcategoryviewtypelayered.xml.
Reference: Adobe Commerce Documentation > Frontend Developer Guide > Theming > Layouts > Common layout customization tasks > Remove a block.
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 9An Adobe Commerce developer is customizing buttons for a custom theme that inherits Magen…
- Question 10An Adobe Commerce developer wants to override the following Layout XML file in the theme …
