| Drupal
Drupal 8 Field Layout Alternative to the Display Suite

In Drupal 7 to create custom displays, you would probably use Display Suite.

Drupal 8 just added a potential alternative to the Display Suite in the core experimental modules. The Field Layout and Layout Discovery modules will allow you to assign a layout to specific content types.

In this tutorial you will learn how to customise the display of content on a content type level with the Field Layout and Layout Discovery modules.

  • Enable the Field Layout module.

Enable the Field Layout module

  • Install
  • You will be warned that the Layout Discovery module is also required. You'll also see a message that experimental modules should only be used for testing.
  • Continue
  • Now we need to assign a layout to our content. For this example, we will use the article content type that comes with Drupal core.
  • Go to Structure > Content types > Manage Display
  • Below the normal options, you will now see that 'layout settings' is available.
  • Select your preferred layout. I have chosen the 3 column option.

Choosing a Drupal 8 layout

  • Click "Save".
  • You will now notice that under Field you see titles for the regions available from this layout as shown below.

Regions for a Drupal layout

  • To change the display, simply drag and drop the item to the location you wish to use and save the layout. Normally images load on the left. For this demonstration I will move them to the right.

Moving fields inside a Drupal layout

  • Click "Save".
  • Now if we view an article, you should see that the changes.

A modified Drupal layout

This is a very fast and easy way to customise the display of content on a content type level. You can even add to it by making your own layouts.

It also works with the Paragraphs module allowing you to assign content to regions within the various paragraph types. Once officially a part of core, this will be a very powerful and fast way to apply layout changes to your Drupal content.

About the author

Daniel is a web designer from UK, who's a friendly and helpful part of the training community.