There are several places in Drupal where elements can be arranged to control their placement.
- Themes have regions, which contain blocks.
- Content forms have form elements.
- Content has fields.
Contrib modules such as Display Suite and Panels can be used to enhance or replace these systems.
- Each of the above have their own mechanisms for laying out their elements. They are separate systems, with varying levels of flexibility.
- In core, content view and content forms have no means of altering their layout in the UI, just rearranging the fields by weight.
- Regions of a theme can be customized, but this is done in files (THEMENAME.info.yml and page.html.twig), and is global for that theme.
Some contributed modules aim to solve this problem, but they also provide many other features that can be overwhelming compared to the task of simply altering a layout.
- Bring the "Layout Plugin" API into core. This will be used by all core layouting systems, and can continue to be used by contrib.
- Enhance the Field UI to allow content and their forms to have customizable layouts. This mimics the basic functionality of Panelizer and Display Suite.
- Allow themes to provide layouts.
- Provide a means to have different theme layouts for different parts of the site.
There is currently discussion over whether the Layout API should live as an experimental module or as an experimental subsystem (or a combination of both).
See and later.
Documentation for transitioning from layout_plugin contrib module to layout_discovery: https://www.drupal.org/node/2619128
API documentation for layout_discovery now available: https://api.drupal.org/api/drupal/8.3.x/search/layout_discovery
Process and where to find it
The tag for these issues is Blocks-Layouts.
- The first step is to add the layout plugin API to core experimentally:
- To validate the implementation, an experimental core implementation should be added and ideally reach beta, one or both of:
- Content layouts: (the initial prototype for )
- Full page layouts:
- For the layout plugin API to be considered stable, it also needs to be validated by (ideally) beta contrib implementations, at a minimum:
- Display Suite: DS already has an 8.x-3.x development branch compatible with this API! http://cgit.drupalcode.org/ds/tree/ds.info.yml?h=8.x-3.x#n8
Additionally, we need to stabilize the layout plugin API in a way that allows these modules (and sites using them) to upgrade from the layout_plugin contrib module to the core module once it is ready to be stable:
Not in scope
- Arbitrary page creation (like Page Manager)
- Layout editing (flexible layouts builder)
Panels, Panels Everywhere, Page Manager, Panelizer, Mini panels, Display Suite, Context
Team and resources
- Developer/Architect: @tim.plunkett (funded by Acquia's Office of the CTO)
- Developer/Designer: @ DyanneNova (funded by Acquia's Office of the CTO)
- Framework manager
- Usability topic maintainers
- Accessibility topic maintainers
- Release manager: xjm in #22
- Product manager: yoroy in #59
No other explicit signoffs have been given, but the initial discussion happened at DrupalCon New Orleans among the following people:
Gábor Hojtsy, xjm, japerry, tim.plunkett, Bojhan, DyanneNova, stevector, dsnopek, ted.bowman, alexpott, yoroy, dobe, hestenet, Crell, swentel, aspilicious