Editorial blocks
We saw in previous chapters how to style blocks that contain a menu, a view, or are provided by some internal modules.
But one of the most useful features of the block system is that it provides editorial blocks that an administrator can place on theme regions based on some visibility rules.
Editorial blocks work more or less like nodes. They have block types (bundles), fields, and revisions. The main differences are that a block doesn’t have a URL and it’s rendered on one or more routes based on some visibility rules.
Note:
The Drupal core module that provides editorial blocks has block_content
as the machine name, but Custom Block as the human-readable name. Block types are called custom block types.
The demo website has one custom block type defined, called banner
, which can be used to provide advertising banners (you can find the list of custom block types here: http://packt.ddev.site/admin/structure/block-content). The banner
custom...