Magento2 | PWA | GraphQL

How to Remove Block From Layout in Magento 2


You can remove block from layout with below code:
1
<referenceblock name="block_name" remove="true"></referenceblock>
For example, remove the coupon code block from the checkout cart page: In checkout_cart_index.xml, you can write below code:
1
2
3
4
5
<page layout="1column" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nonamespaceschemalocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
    <body>
        <referenceblock name="checkout.cart.coupon" remove="true"/> 
    </body>
</page>
0 Comments On "How to Remove Block From Layout in Magento 2"

Back To Top