Add daily email for 2025-01-26

Why I like Drupal's Layout Builder
This commit is contained in:
Oliver Davies 2025-02-03 17:17:29 +00:00
parent 66e03c5840
commit ade4adba12

View file

@ -0,0 +1,39 @@
---
title: Why I like Drupal's Layout Builder
date: 2025-01-26
permalink: daily/2025/01/26/layout-builder
tags:
- software-development
- drupal
cta: ~
snippet: |
I've built Drupal websites for 18 years. These are some reasons why I like the Layout Builder that's been included in Drupal core since 8.7.
---
I've built Drupal websites for 18 years and have worked with versions as old as Drupal 5.
A common issue for people using the CMS has been the editorial experience when adding and editing content.
Once logged in, to add or edit a node, they need to go to a separate administration screen to enter or change the content.
The administration page usually looks nothing like what the page will look like once published, with the user only seeing large forms and different styles, or a different theme altogether.
There is a page preview option, but this only works once the forms have been completed and requires the user to be able to "see" how the page will look beforehand and know what content will appear where.
This has only become trickier with the use of Paragraphs and entity reference fields, where the editor only sees the title of the content they want to reference but not what they will see or how it will look.
As well as being difficult to create content, it also makes it difficult to edit it.
## Layout Builder
This is why I like Drupal's Layout Builder module.
Originally released as a contributed module, it has been part of Drupal core since 8.7 and allows editors to be able to create complex pages using a drag and drop interface and instantly see how they look.
There's now an ecosystem of Layout Builder-related modules, [including one I wrote][0], that add more functionality to the Layout Builder, such as adding more template suggestions, restricting the available blocks, or adding inline styles - making it even more powerful.
If you have a Drupal site and haven't tried Layout Builder, you can incrementally opt in and only enable it for certain content types. You don't need to go all in straight away.
But, I think that once you've tried it, you won't be able to go back.
[0]: https://www.drupal.org/project/layout_builder_extra_templates