Advertising sustains the DA. Ads are hidden for members. Join today

Contributed modules documentation

Layout plugin

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

How to register layouts with Layout Plugin

The Layout plugin module allows modules or themes to register layouts, and for other modules (like Panels or Display Suite) to use them.

How to render layouts using Layout Plugin

The Layout plugin module allows modules or themes to register layouts, and for other modules (like Panels or Display Suite) to use them.

Guide maintainers

dsnopek's picture