Drupal Lite 8, 9: Using Layout Builder
This article applies to Drupal Lite 8 and 9.
Each content type has a default layout for presenting the fields. Using Layout Builder allows for the customization of any page. Layout Builder can be used to:
- Apply layout templates to new sections of a page.
- Drag and drop content blocks to different areas of the page.
- Add site-wide content blocks, such as lists of content.
- Add custom content blocks to a region.
Access Layout Builder
- Select Content in the administration menu at the top of the page.
- Find the content in the list.
- Select Edit. The edit content page is displayed.
- Select the Layout tab at the top of the page.
A representation of the page is displayed where each of the content blocks are located. For a General Page, the Media block is in the header region, the Body and Tags are in the left region, and the Folwell Components are in the right region.
General Page default layout.
Create a New Layout for a Page
There isn't a way to change the layout of a page. Instead, a new section is added to the page with the new layout, and then the blocks are dragged into the new section. Then the old, now empty, section is removed from the page.
- Select one of the Add Section buttons.
- Choose a layout from the list.
- The new layout is added to the page either above or below the current layout, depending on which button was selected in step 1.
- Drag the field blocks from the old layout to a region in the new layout. In the image below, the Body will move to the right side, the Folwell components to the header area, and the Media to the left side.
- If you want to remove a field, select the pencil icon in the upper right corner of the field container, and then select Remove Block.
- After selecting Remove Block, confirm that you want to remove it. Although it says the action cannot be undone, you can re-add the block at any time.
- Remove the old section by selecting the X in the top left of the (now empty) section.
Add Content Blocks to a Layout
Additional content blocks can be added to any of the regions in the layout. There are three types of blocks:
- Custom Block. This can be either a basic block (text box) or a Folwell Component.
- Content Field. These are the fields for the Content Type.
- Drupal Lite - Lists (Views). These are lists of content.
Please refer to the article Drupal Lite 8: Add New Content Blocks.