Build a Blog in Drupal 8: Managing Blocks

The Block system in Drupal allows you to add arbitrary content into regions within a theme. A block could be as simple as just text or list content using Views.

In Drupal 7, the Block system is pretty limiting. For instance, a single block can only be assigned to a single region. You also have very basic control of hiding and displaying blocks.

To handle these short comings in Drupal 7 you would use Panels for complex layouts and Bean so you can add fields to blocks.

In Drupal 8, the Block system has been revamped and it’s more flexible. The two big improvements: assign a single block to multiple regions and fieldable block types.

In this tutorial, we’ll continue work on our Drupal 8 blog site. We’ll add a static call-to-action which’ll only appear in the sidebar on the blog page. This call-to-action could be some promotional content or a newsletter sign-up form.

Then we’ll create a custom block type which we’ll use to create reusable promotional content that can be added to any blog post.


Source: http://feeds.feedburner.com/webwash

Leave a Reply