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.
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.
- See the change record on the Layout plugin for more information.
- How to upgrade from Layout plugin to Layout API / Layout discovery when moving from 8.2.x to 8.3.x.
- How to render layouts, the new way in 8.3.x.
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
You can:
- Log in, click Edit, and edit this page
- Log in, click Discuss, update the Page status value, and suggest an improvement
- Log in and create a Documentation issue with your suggestion