Allow layouts to provide dynamic regions

Created on 19 August 2019, over 5 years ago
Updated 18 July 2024, 5 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

Closed: works as designed

Version

11.0 πŸ”₯

Component
Layout builderΒ  β†’

Last updated 1 day 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 9 months ago
  • πŸ‡«πŸ‡·France dqd London | N.Y.C | Paris | Hamburg | Berlin

    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(?)

  • Status changed to Closed: works as designed 5 months ago
  • πŸ‡³πŸ‡ΏNew Zealand danielveza Brisbane, AU

    Solutions for how to achieve this have been posted in this video and it has been over three months since the last update where this was marked as Postponed (maintainer needs more info).

    Therefore I'm marking this one as closed. Please feel free to reopen or open a follow up ticket if you think there is still work to be done here.

    Thanks!

Production build 0.71.5 2024