0

I would like to create a block consisting of multiple other blocks, combined with a layout or some other kind of wrapper html.

A typical example would be a footer with 4 columns containing a menu, some custom text, etc.

The entire thing should be configurable in the UI and then exportable to the CMI system.

Known solutions

I know that this is possible in Drupal 7 using renderkit + cfrblock. However this has not been ported to Drupal 8 (yet). I will get there eventually, but atm I would like to find out if another solution might already exist.

EDIT: On D8 there is blockgroup, but it does not really work for me.

Related issues

How to group multiple blocks into one big block I think this is for D7.

Thanks!

2
  • 1
    Blockgroup will allow you to create groups of blocks. Other than that, all I can think of is Paragraphs in blocks.
    – Kevin
    Feb 3, 2020 at 19:04
  • I had tried blockgroup, but my mistake was to name the block group the same as the theme region :)
    – donquixote
    Feb 3, 2020 at 23:09

1 Answer 1

0

Use blockgroup. Add block_class if needed.

When creating the block groups, make sure that the machine name does not clash with existing theme region machine names! (from any theme, ideally)

After you created a block group, it will show up in two ways in the blocks UI:

  • As a new theme region (if you avoided the name clash)
  • As a block that can be placed.

Block class allows to add classes (e.g. bootstrap grid classes) to each block and block group.

This is not 100% what you would get with a layout, but it is getting close, and will be sufficient in many cases.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.