Allow layouts to provide dynamic regions

Created on 19 August 2019, almost 5 years ago
Updated 16 March 2024, 3 months ago

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

Introducing a new DynamicRegionsProviderInterface that could be implemented by Layout classes. That would allow layout to provide additional regions if needed. Thanks to that, we could work around any limits currently set by the layout_builder, by delegating dynamic construction of more complex layout structures to the Layout class itself.

Remaining tasks

  • Patch review
  • Discuss and agree on the solution

API changes

Addition of a new optional interface for layout classes. This change is completely backward compatible.

✨ Feature request
Status

Postponed: needs info

Version

11.0 πŸ”₯

Component
Layout builderΒ  β†’

Last updated about 3 hours ago

Created by

πŸ‡΅πŸ‡±Poland Luke_Nuke

Live updates comments and jobs are added and updated live.
  • Blocks-Layouts

    Blocks and Layouts Initiative. See the #2811175 Add layouts to Drupal issue.

  • Novice

    It would make a good project for someone who is new to the Drupal contribution process. It's preferred over Newbie.

  • Needs issue summary update

    Issue summaries save everyone time if they are kept up-to-date. See Update issue summary task instructions.

Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • πŸ‡ΊπŸ‡ΈUnited States dalemoore

    Hi @larowlan, the video you've linked to twice on here isn't viewable. It looks like you have to be part of the Drupal Association Slack? Can you repost the video so we can see how your dynamic tabs works?

  • πŸ‡¦πŸ‡ΊAustralia larowlan πŸ‡¦πŸ‡ΊπŸ.au GMT+10

    Sure

  • πŸ‡¦πŸ‡ΊAustralia larowlan πŸ‡¦πŸ‡ΊπŸ.au GMT+10

    Also, I recommend joining the slack, the community is a huge part of the power of Drupal

  • πŸ‡ΊπŸ‡ΈUnited States dalemoore

    Thanks, that's helpful to see how it worked.

    I couldn't get signing up for Drupal Slack to work before (though I'm a new Slack user). It required either a Google or Apple account or an @association.drupal.org email. The "Continue with Google" method wouldn't work. But I found the link under "Joining" here β†’ and was able to create an account on there. Thanks.

  • πŸ‡§πŸ‡ͺBelgium Wim Leers Ghent πŸ‡§πŸ‡ͺπŸ‡ͺπŸ‡Ί

    AFAICT @larowlan showed in the blog post he created 3 years ago at https://www.previousnext.com.au/blog/creating-layout-plugin-dynamic-regions that this is already supported?

    @Luke_Nuke: can you confirm that your use case can indeed be achieved without modifying Drupal core?

    Can we close this issue? 🀞

  • Status changed to Postponed: needs info 3 months ago
  • πŸ‡©πŸ‡ͺGermany diqidoq Berlin | Hamburg | New York | London | Paris

    That would be great news and +1 for what @WimLeers sad: If the scope of this issue is already covered in core let's move on and close this. Would be great if @Nuke_Luke can confirm this. Apart from that I will go and test now to confirm. Other users who can confirm that is works already would be helpful too. Regarding our policies β†’ I set it to PMNMI for now(?)

Production build 0.69.0 2024