AD0-E720 practice question 1 of 10

An Adobe Commerce developer is trying to remove a block using the

Full set: 50 questions
Answer options
A: US6 Correct answer
B: Use
C: Use
Correct Answer:
A. US6
Explanation

The instruction is the standard and most reliable method in Adobe Commerce to remove an existing block from the layout. This tag explicitly references a block by its unique name and uses the remove="true" attribute to instruct the layout rendering engine to exclude it from the page. While is a valid instruction, it can be less predictable depending on the layout handle's processing order. The referenceBlock approach is more robust and is the recommended practice for modifying or removing existing blocks.

Why Incorrect

B. This action removes a child block from its parent. It is context-dependent, requiring placement within the parent block's definition, and is not a general method for removing any block.
C. This tag is specifically used to reference and remove a container (), not a block (). Using it to target a block element would be semantically incorrect and would not work.

References

1. Adobe Commerce Developer Documentation, "Layout instructions": This official guide details the XML instructions for layout manipulation. It explicitly documents the use of with the remove attribute.

Section:

Quote: "To remove a block, use the remove attribute with a true value: "

Source: Adobe Inc. (2023). Layout instructions. Adobe Experience League. Retrieved from https://developer.adobe.com/commerce/frontend-core/guide/layouts/xml-instructions/

2. Adobe Commerce Developer Documentation, "Layout instructions": The same document also explains the purpose of , distinguishing it from .

Section:

Quote: "References a container. The main purpose of this instruction is to add child elements to the container." (It can also be used with remove="true" but only for containers).

Source: Adobe Inc. (2023). Layout instructions. Adobe Experience League. Retrieved from https://developer.adobe.com/commerce/frontend-core/guide/layouts/xml-instructions/

Scroll to Top