How to render layouts using Layout Plugin

Last updated on
30 April 2025

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

The Layout plugin API is also included in a modified version experimentally in Drupal 8.3.x core. As 8.3.x has been released, Layout plugin is no longer intended to be used and Layout discovery should be used instead. The APIs are slightly different.

Drupal 8.3.x development should use Layout API/Layout discovery. If you're writing a module in 8.2.x that needs to allow users to choose a layout and then render stuff in, please use Layout Plugin to do it rather than creating your own way of defining layouts! Both Panels and Display Suite started using it, it has become the basis for the standard in Drupal 8 (merged into core #2296423: Implement layout plugin type in core).

See this page for information on how to register a layout with Layout plugin for Drupal 8.2.x.

Getting the layout plugin manager

TODO

Listing available layouts and instantiating a layout plugin

TODO

Rendering a layout

TODO

Showing the configuration form for a layout

TODO

Storing configuration for the selected layout

TODO

Help improve this page

Page status: Not set

You can: