Quantcast
Channel: Issues for Drupal core
Viewing all articles
Browse latest Browse all 298901

Allow layouts to provide dynamic regions

$
0
0

Problem/Motivation

Currently layout_builder is very limited when it comes to more complex layouts. The issue is lack of nesting or wrapping ability. See:

I believe that all use cases bringing people towards these issues could be solved if we would simply allow people to create layouts with configurable regions. These could be a "second class citizens", yet would allow devs or contrib modules to develop custom complex rules of layout building, and store them in layouts configurations.

Proposed resolution

The simplest way of supporting this would be to add a new method to the Drupal\Core\Layout\LayoutInterface: getDynamicRegions. Other parts of the system could decide themselves if they want to support dynamic layout regions or not, as this information is not always available, but where it is available, it is very useful.

Remaining tasks

  • Patch review
  • Discuss and agree on the solution

API changes

Drupal\Core\Layout\LayoutInterface modified with additional method. It would be implemented by default in the Drupal\Core\Layout\LayoutDefault though.


Viewing all articles
Browse latest Browse all 298901

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>