Problem/motivation

Currently all themes declare their set of regions which is global to the theme. In #1787846: Themes should declare their layouts we want to make it possible for themes to define multiple layouts for the user to pick from. Those might or might not come with different sets of regions. It is possible the consensus is that multiple region sets are not to be supported for themes and one theme should have regions unified for all its layouts (which would be easier to implement both for themers and Drupal core).

However, the ultimate goal of decoupling layouts from themes is that modules could define layouts as well in future issues (http://drupal.org/project/layout is ported to Drupal 8 and is proposed to core to fulfill that role). For this to work, even if theme defined layouts use the same regions for all layouts within a theme, layouts will definitely not be unified in terms of regions across module defined layouts. This means we should stop relating blocks to themes and should relate them to layouts instead.

The list of layouts introduced in #1787846: Themes should declare their layouts should be able to provide the base data (labels and machine names) to relate blocks to.

Related issues

#1787634: [META] Decouple layouts from themes

Comments

From #1787846: Themes should declare their layouts:

Posted by ipwa on September 21, 2012 at 2:48pm
What would happen when you change layouts to a layout that doesn't have al the regions you have assigned blocks to? Would these blocks get disabled or assigned to a default region?

Posted by EclipseGc on September 21, 2012 at 3:53pm
That's under debate. I would prefer a mapping screen to pop up that let you move all blocks in one regions to another region in the new layout.

This is always something that bothered me from the way block assignment works. When you migrate a Drupal site and the destination doesn't have your custom theme, all the blocks that where assigned to custom regions get disabled. Having some kind of ui that maps where you'd like to set the blocks that would otherwise get disabled when you switch layout sounds awesome. +1 for that approach from me.

Issue tags:+Spark

Tagging with "Spark."

Title:Make blocks relate to layouts instead of themesMake blocks relate to layout instances instead of themes

blocks relate to instances of layouts, not the layouts themselves.

the Display object is the proper place for block instances to be bound to other stuff: #1812720: Implement the new panels-ish controller [it's a good purple]

Version:8.x-dev» 9.x-dev
Issue tags:-Spark

Untagging, and looks like this is probably D9 at this point.