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

ipwa’s picture

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.

webchick’s picture

Issue tags: +Spark

Tagging with "Spark."

sdboyer’s picture

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

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

sdboyer’s picture

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]

webchick’s picture

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

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

catch’s picture

Issue summary: View changes
Status: Active » Closed (duplicate)

Duplicate of #2811175: [plan] Add layouts to Drupal and related issues, which are being worked on for 8.x

Version: 9.x-dev » 9.0.x-dev

The 9.0.x branch will open for development soon, and the placeholder 9.x branch should no longer be used. Only issues that require a new major version should be filed against 9.0.x (for example, removing deprecated code or updating dependency major versions). New developments and disruptive changes that are allowed in a minor version should be filed against 8.9.x, and significant new features will be moved to 9.1.x at committer discretion. For more information see the Allowed changes during the Drupal 8 and 9 release cycles and the Drupal 9.0.0 release plan.