Adding layout updates
In the previous recipe, we created a page without content. In this recipe, we will modify the content of that page with layout updates.
With layout updates, we can arrange the structure of the page as we have seen in the Customizing the HTML output recipe of Chapter 3, Theming. But here, we will see how we can do that in a module.
Getting ready
This recipe builds further on the previous recipe. You need the install the module that we created in the previous recipes of this chapter.
How to do it...
In the next steps, we will see how we can modify the block layout with our module:
- Create the
app/code/Packt/HelloWorld/view/frontend/layout
folder. - In this folder, create a file called
default.xml
with the following content:<?xml version="1.0"?> <page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd"> <body> <referenceBlock...