O'Reilly logo

Magento 2 Development Cookbook by Bart Delvaux

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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:

  1. Create the app/code/Packt/HelloWorld/view/frontend/layout folder.
  2. In this folder, create a file called default.xml with the following content:
    <?xml version="1.0"?> ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required