Layout Builder: Introduction

Objective
  1. Provide an ability to create customizable/flexible pages through Drupal UI
  2. Provide an ability to design a template at a content type and node-level layouts.
     
Recipe Type
Status
Active
Recipe Tags
Steps to Build
  1. Enable Module:
    A. Go to the Extend and enable "Layout Builder" module.
    Layout build 1
    Note: The Layout Discovery module is a dependent module, so click Continue.
    Note: Good about layout builder is that now its core module from version 8.5.
     
  2. Launching Layout Builder:
    A. Go to Structure -> Content types -> From operation column click on the dropdown arrow of required content type ->  click on “Manage display.”
    Layout build 2

    B. Check “Use Layout Builder” which is at the bottom of the page and then click on save.
    Layout build 3
    Note: Here, in the above example, the full content display is shown, but you can use layout builder to any display as per requirement.

    C. Layout builder gives one additional option to override individual entities/node
    Layout build 4
    With this option, you can override specific entity/node without disturbing default layout of entity types.
     
  3. Manage Layout:
    A. Once the above settings are done, you will see “Manage layout”, you will be redirected to the page to configure layout.
    Layout build 5

    B. To configure the layout by different sections, click on "Add section" then choose a section from the list which is visible on the right-hand side.
    Layout build 6

    C. You can configure the section´s column width value or keep the default value as it is.
    Layout build 7
    Once all settings are done, click on “Add section”. Likewise, you can configure any sections.

    D. You can add any type of block(s) within the section. For this, click on “Add Block”, Choose a required block from the list which is visible on the right-hand side. 
    Layout build 8

    E. After adding a block, you can configure block if required.
    Layout build 9

    F.  To change the region of blocks, simply drag them to the required region.
    Layout build 10
    Once all configurations are done, click on “Save layout

    G. To edit any layout, you can click on "layout tab" which is available on the node view page
    Layout build 11
    Note:  For this, the option “Allow each content item to have its layout customized" must be checked (As mentioned in 2.C)

    Note: You can use the “umami” profile for testing layout builder in detail.

 

Some additional/contributed modules are available to extend layout builder which will be cover in our next recipe. 

Conclusion
  1. Layouts can be customized as per the need in a quick and simple way.
  2. Layout Builder also gives you a preview of any changes before saving the page.
  3. This module gives an easy way to the site builder to create a page with different layout/sections/blocks in a very simple drag and drop facility.

 

Supporting Organizations
Participants