Where Block Drupal module beats Layout Builder

Drupal core ships Block and Layout Builder modules.

  • Block module is in business of placing blocks.
  • Layout Builder module is in business of placing blocks.

But...

Block placements are decentralized: Each block placement is a config entity. Several modules can work together to place blocks on the same page. In other words, a module providing a block placement, doesn't know if a different module is also providing a placement on the same page or even on the same region.

while...

Layout Builder placements are centralized: All the block placements are living in a single object (e.g. as 3rd-party settings of the entity view display). This means that the underlying object should know that the modules providing the block exists. As an effect, the object providing the block placements has a hard dependency on modules providing the blocks. Third-parties are not able to hook-in by themselves, they should be dependencies of the module that provides the object providing the placements.

This is, probably, the only advantage of Block module over Layout Builder. Its decentralized nature.

Read the whole post ?

要查看或添加评论,请登录

Claudiu Cristea的更多文章

  • Drupal 8/9: Theme negotiation based on condition plugins

    Drupal 8/9: Theme negotiation based on condition plugins

    Sooner, the European Commission Drupal project I'm working on, will transition to a new theme. During the transition…

  • Effective form spam protection with Form Protect

    Effective form spam protection with Form Protect

    Form Protect is my first Drupal 8 module, even it's a tiny one. First I needed the module for a Drupal 7 client project.

  • Welcome Drupal 8!

    Welcome Drupal 8!

    First Drupal 8, the Release Candidate 1, is out after a fantastic work of more than 3,200 core contributors. Although…

  • Drupal 8 is now part of our Training Curricula

    Drupal 8 is now part of our Training Curricula

    Original post: webikon.com/drupal-8-is-now-part-of-our-training-curricula As the date for Drupal 8 stable release is…

  • Park your old Drupal site

    Park your old Drupal site

    Original post: https://webikon.com/cases/park-your-old-drupal-site.

  • Behat and Drupal Extension at first touch

    Behat and Drupal Extension at first touch

    Original post: webikon.com/cases/behat-and-drupal-extension-at-first-touch I was really impressed, back in 2013, by…

社区洞察

其他会员也浏览了