An update on the Layout Initiative for Drupal 8.4/8.5

Now Drupal 8.4 is released, and Drupal 8.5 development is underway, it is a good time to give an update on what is happening with Drupal's Layout Initiative.

8.4: Stable versions of layout functionality

Traditionally, site builders have used one of two layout solutions in Drupal: Panelizer and Panels. Both are contributed modules outside of Drupal core, and both achieved stable releases in the middle of 2017. Given the popularity of these modules, having stable releases closed a major functionality gap that prevented people from building sites with Drupal 8.

8.4: A Layout API in core

The Layout Discovery module added in Drupal 8.3 core has now been marked stable. This module adds a Layout API to core. Both the aforementioned Panelizer and Panels modules have already adopted the new Layout API with their 8.4 release. A unified Layout API in core eliminates fragmentation and encourages collaboration.

8.5+: A Layout Builder in core

Today, Drupal's layout management solutions exist as contributed modules. Because creating and building layouts is expected to be out-of-the-box functionality, we're working towards adding layout building capabilities to Drupal core.

Using the Layout Builder, you start by selecting predefined layouts for different sections of the page, and then populate those layouts with one or more blocks. I showed the Layout Builder in my DrupalCon Vienna keynote and it was really well received:

8.5+: Use the new Layout Builder UI for the Field Layout module

One of the nice improvements that went in Drupal 8.3 was the Field Layout module, which provides the ability to apply pre-defined layouts to what we call "entity displays". Instead of applying layouts to individual pages, you can apply layouts to types of content regardless of what page they are displayed on. For example, you can create a content type 'Recipe' and visually lay out the different fields that make up a recipe. Because the layout is associated with the recipe rather than with a specific page, recipes will be laid out consistently across your website regardless of what page they are shown on.

The basic functionality is already included in Drupal core as part of the experimental Fields Layout module. The goal for Drupal 8.5 is to stabilize the Fields Layout module, and to improve its user experience by using the new Layout Builder. Eventually, designing the layout for a recipe could look like this:

Drupal field layouts prototype

Layouts remains a strategic priority for Drupal 8 as it was the second most important site builder priority identified in my 2016 State of Drupal survey, right behind Migrations. I'm excited to see the work already accomplished by the Layout team, and look forward to seeing their progress in Drupal 8.5! If you want to help, check out the Layout Initiative roadmap.

Special thanks to Angie Byron for contributions to this blog post, to Tim Plunkett and Kris Vanderwater for their feedback during the writing process, and to Emilie Nouveau for the screenshot and video contributions.


David Snopek (not verified):

Traditionally, site builders have used one of two layout solutions in Drupal: Panelizer and Panels.

What about Display Suite?

Of course, I'm from the Panels world, but Display Suite was also a major driver of "Layout Plugin" (which became "Layout Discovery" in core), and they had a D8 stable release way before Panels and Panelizer! I think DS deserves mention and credit for the awesome they've done in Drupal 8. :-)

EclipseGc (not verified):

Hey David,

Absolutely! DS has been an awesome module for site builders and an awesome contributor to both the adoption of the code in core and to the approach we're trying to get into core for layout building. While all the contributors to the code Dries is talking about here are also Panel-centric folks, we discussed DS at many points in our efforts to build this and recognize its contribution to the process.

It's easy to get caught up in our own perspectives, and since the contributors to this code and advisors to this blog were all Panels-ists we may have made an oversight, but DS was considered and influential through this whole process, and I think we all recognize that. :-D


Julian Pustkuchen (not verified):

# Per-entity display (override)? #

Thank you very much for these great and essential features in core. While we never were friends of DS, an important point for us was panelizers feature to set / override layout on a per-entity basis.

Like with paragraphs the per-entity approach is quite important because you may have single contents with a different layout which do not justify a further entity type. That way you are also enabled to embed other contents just into that single page (per-entity outside-in)

Will this aspect be considered? Otherwise it would be very nice to discuss the benefits.

Thank you very very much.

xjm (not verified):

The alpha version of the Layout Builder (committed to core just this past week) already lets you create a layout on a per-entity basis. :) (In fact, we did that *before* creating the generic default for the overall entity type displays, since the experimental Field Layout module already provided a very basic way to do that.)

If you install Drupal 8.5.x-dev and enable the Layout Builder module, you can even try it out. :) Enable the Layout builder, create a piece of content, and then click the "Layout" tab on that piece of content. There's still work to be done on fully implementing the design and so forth, but it works!

Andru (not verified):

I would echo Julian Pustkuchen's comment about needing to shape things on a per-entity basis. I've sometimes been driven to create a new region to get a block displayed where I want it, so all these improvements are very welcome, thanks.

Leon Kessler (not verified):

I for one, am a bit concerned about these change. It's a big move, standardising on one layout builder.

What is this layout builder module based on? (Some background into its development would be really appreciated).
To me it looks like it's taken straight out of Acquia Lightning, which itself it just a tweaked version of Panelizer.

Also, the Field Layout module looks just like its directly replicating some of Display Suite's functionality. Why was Display Suite not considered as a candidate for core?

This is such a big decision to make, to put a layout builder in core.

Drupal 7 had a lot of different layout options (Panels, Display Suite, Context, etc). This was quite overwhelming, but it was also healthy competition. Different methodologies suited different scenarios.

I'd really like to see more information about these changes, particularly with information targetted at developers.


Add new comment

The content of this field is kept private and will not be shown publicly.

Plain text

  • No HTML tags allowed.
  • Lines and paragraphs break automatically.
  • Web page addresses and email addresses turn into links automatically.