ExamGecko
Question list
Search
Search

List of questions

Search

Related questions











Question 16 - AD0-E720 discussion

Report
Export

An Adobe Commerce developer is trying to remove a block using the <remove name='test.block'/> tag in a layout XML file but it shows an error and doesn't work.

Which tag would be applied to fix the error?

A.
US6 <referenceBlock name='test.block' remove='true'/>
Answers
A.
US6 <referenceBlock name='test.block' remove='true'/>
B.
Use <remove name='Custom_Module:test.block'/>
Answers
B.
Use <remove name='Custom_Module:test.block'/>
C.
Use<referenceBlock name='test.block' delete='true'7>
Answers
C.
Use<referenceBlock name='test.block' delete='true'7>
Suggested answer: A

Explanation:

To remove a block using layout XML, the developer 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=''test.block'' remove=''true''/>

This will remove the block from the layout and prevent it from rendering. The <remove> tag is not valid and will cause an error. The name attribute should not include the module name, as it is not part of the block name. The delete attribute is not valid and will not work.

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

asked 02/10/2024
Brooke Galiata
32 questions
User
Your answer:
0 comments
Sorted by

Leave a comment first