Adding Magento 2 Containers

Magento uses containers and blocks to structure the layout of a page. Containers define the structure of the page and do not contain any additional content, and occasionally you may need to go about adding Magento 2 containers that contain custom functionality from the blocks that reside within these containers.
In order to do this, …

Common Magento 2 Layout Tasks

Below is a list of common Magento 2 layout tasks taken within a typical Magento store. This post will assume that you have correctly added your own Magento theme, and the theme extends Magento’s original blank theme.
You can add the XML into the default.xml layout file if you want the layout updates to apply …

Magento 2 Layout Updates

One of Magento’s major advantages is allowing the user to customise the layout of their theme using Magento 2 layout updates.
There are a couple of ways to do this; either by extending or overriding the default layout.
Let’s assume you have a custom theme setup that inherits from Magento’s blank theme. To extend layout …

Adding Magento 2 Module Layout Updates

A common task within Magento is to add layout updates to a custom module. These layout updates extend existing Magento layout configuration and can add additional template files to your storefront. This article will demonstrate adding Magento 2 module layout updates.
To start with, register a custom module that will hold your layout updates.
Create …

Adding and Removing Top Links in Magento 2

It is quite common for developers to customise their website header by adding and removing top links in Magento 2. Similar to earlier versions of Magento, the links are added within several layout XML files.
If you have installed Magento via Composer, the location of the customer-related links will be found in the following path.