How to eliminate block in layout in Magento 2

In this post the following  methods are used to eliminate block in layout in Magento2. In current version of Magento 2, the eliminate method is:

<referenceBlock name=”block_name” remove=”true”/>

Examples: remove newletters in block on page and footer link block on page

<?xml version="1.0"?>

<page layout="1column" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xsi:noNamespaceSchemaLocation="../../../../../../../lib/internal/Magento/Framework/View/Layout/etc/page_configuration.xsd">

<body>

<referenceBlock name="form.subscribe" remove="true" />

 <referenceBlock name="footer_links" remove="true" />

</body>

</page>

The following steps are the smallest process for you to eliminate layout in Magento 2.

Last Update: April 9, 2018  

February 9, 2018   133   Nandini R    Theme    
Total 1 Votes:
0

Tell us how can we improve this post?

+ = Verify Human or Spambot ?

Leave a Reply

Your email address will not be published. Required fields are marked *

Facebook
Google+
http://www.webnexs.com/blog/kb/eliminate-layout-magento-2
Twitter
LinkedIn