ExamGecko
Question list
Search
Search

List of questions

Search

Related questions











Question 17 - AD0-E720 discussion

Report
Export

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?

A.
app/design/frontend/Vendor/Theme/Magento_LayeredNavigation/layout/override/catalog_category_view_type_layered.xml
Answers
A.
app/design/frontend/Vendor/Theme/Magento_LayeredNavigation/layout/override/catalog_category_view_type_layered.xml
B.
app/design/frontend/Vendor/Theme/Magento_Layered.Navigation/layout/catalog_category_view_type_layered.xml
Answers
B.
app/design/frontend/Vendor/Theme/Magento_Layered.Navigation/layout/catalog_category_view_type_layered.xml
C.
app/design/frontend/Vendor/Theme/Magento_Catalog/layout/catalog_category_view.xml
Answers
C.
app/design/frontend/Vendor/Theme/Magento_Catalog/layout/catalog_category_view.xml
Suggested answer: B

Explanation:

To remove the default Wishlist and Compare Products blocks on a category page with layered navigation, the developer should place the modification in the app/design/frontend/Vendor/Theme/Magento_LayeredNavigation/layout/catalog_category_view_type_layered.xml file. This file is specific to the category pages with layered navigation and will override the default layout file from the Magento_LayeredNavigation module. The modification should use the <referenceBlock> tag with the name attribute specifying the name of the block and the remove attribute set to true. For example:

<referenceBlock name=''catalog.compare.sidebar'' remove=''true''/> <referenceBlock name=''wishlist_sidebar'' remove=''true''/>

The app/design/frontend/Vendor/Theme/Magento_LayeredNavigation/layout/override/catalog_category_view_type_layered.xml file is not valid and will not work, as it is not a valid override path. The app/design/frontend/Vendor/Theme/Magento_Catalog/layout/catalog_category_view.xml file is not specific to the category pages with layered navigation and will affect all category pages.

Reference: [Layout override], [Remove an element]

asked 02/10/2024
william hwang
28 questions
User
Your answer:
0 comments
Sorted by

Leave a comment first