1

In Drupal 7 I use the ctools_custom_content (Custom content panes) module to create exportable panel panes to drop into my panel pages. This module doesn't exist for Drupal 8, nor do I see any other way to create panes with the Panels, Page Manager and ctools modules installed.

Have blocks, which are now entities, effectively replaced custom content panes in Drupal 8? Or is there a different core feature or contributed module that I should look to for similar functionality?

1 Answer 1

1

There are 3 different things called "block" in Drupal 8. plugins, config entities and content blocks. See Adding custom block problems for an explanation.

But yes, to answer your question, content blocks are exposed as block plugins and can then be used not only for placing blocks in regions but also with page_manager/panels. You don't need anything else.

One limitation is that they can't be exported easily into config, since they are content. If you don't need extensible structure but only a text or a reference, then you could build your own block plugin or wait for a contrib module to do that (I recently saw a module that did basically that in 7.x with its own plugin system, would be very easy to make the same for 8.x as core provides 90% of what's needed. Can't remember the name right now.)

2
  • Thanks for the answer! It helped me realize that the "exportable" bit is key to my question. If neither you nor anyone else knows of a currently available contrib module that allows for easily exportable blocks of text, I may try building my own block plugin as you suggest.
    – Jack A.
    Commented Mar 22, 2016 at 5:29
  • Can't find the one that I remember but that was 7.x only anyway. I did find drupal.org/project/simple_block but that creates a separate config entity, which means you always have to create that first and can then place it. Unless you are specifically looking for reusable blocks, that seems overkill to me and you can achieve the same with a trivial block plugin.
    – Berdir
    Commented Mar 22, 2016 at 7:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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