Get Even More Visitors To Your Blog, Upgrade To A Business Listing >>

Remove Block from Layout in Magento 2

When you are creating your own Magento 2 extension, you often have to remove a block. This was very easy in Magento 1 as you could just use

In Magento 2, this doesn’t work. The team at Magento has completely changed the way you remove a block from the Layout in M2, and we’ll show you how to do it. The remove method is now simply

Practical Example:

As you can see, you place it between the body tags in the page layout in the layout.xml file that you are editing. It’s as simple as that! This method of removing a block this way has a few advantages over the old way, as you can now do things that previously were impossible. All in all its easier for Magento developers as you’ll be less frustrated when programming in the layout!

The post Remove Block from Layout in Magento 2 appeared first on Coding Basics.



This post first appeared on Coding Basics - Programming & Magento Tutorials, please read the originial post: here

Share the post

Remove Block from Layout in Magento 2

×

Subscribe to Coding Basics - Programming & Magento Tutorials

Get updates delivered right to your inbox!

Thank you for your subscription

×