Last updated 22 July 2017. Created on 19 November 2015.
Edited by xjm, HongPong, dsnopek. Log in to edit this page.

Note: This page is out of date. See the current Layout API documentation
for Drupal 8.3.x+.

For Drupal 8.0.x-8.2.x, the Layout plugin module allows modules or themes to register layouts, and for other modules (like Panels or Display Suite) to use them.

Instead of using Layout plugin in Drupal 8.3.x core, new modules Field Layout and Layout Discovery are now available experimentally. More info on the 8.3.x release post.

Transitioning to experimental modules from layout plugin in Drupal 8.3.x

At this time, Layout Plugin and Layout Discovery cannot be run at the same time in a Drupal 8.3.x instance. (See issue: #2867795: White screen (WSOD @ Drupal 8.3) ERROR: Cannot use object of type as array )

Try the following process to move to the experimental modules:

  1. Remove or at least uninstall any contrib product that relies on Layout plugin;
  2. Uninstall (maybe even delete) layout plugin
  3. Update database schema.

It is best to use the 4.x branch of the following modules when completing this transition:

For more info see issues: #2811175: [plan] Add layouts to Drupal and #2867795: White screen (WSOD @ Drupal 8.3) ERROR: Cannot use object of type as array

Possible issues:

  • Names changing for bundled layouts, e.g. "onecol" changes to "layout_onecol"; this can be handled via an update script.
  • API changes for custom integrations; this needs documentation.

Developer documentation

Looking for support? Visit the forums, or join #drupal-support in IRC.


g089h515r806’s picture

There is no disable choice in Drupal 8, So the only way to update to Layout Discovery is completely delete it, then rebuild the same function with the new version module.

Chinese drupal tutorials Think in Drupal

xjm’s picture

"Disable" above should be "uninstall", thanks! I'll update this.

xjm’s picture

The contributed Layout Plugin module is also now obsolete. For documentation on the core Layout API, see: