Check your version

This video covers a topic in Drupal 7 which may or may not be the version you're using. We're keeping this tutorial online as a courtesy to users of Drupal 7, but we consider it archived.

Region to Block

Video loading...

  • 0:00
    Display Suite for Drupal 7 - Region to Block
  • 0:03
    with Kristof De Jaeger
  • 0:04
  • 0:05
  • 0:05
    This is Part 7 of the Display Suite for Drupal 7 screencast series.
  • 0:11
    And in this part, I'm going to talk about the Region to Block feature.
  • 0:16
    So the Region to Block is a feature that's
  • 0:19
    available in the Extras module.
  • 0:20
    So you have to enable the Extras module and then go to the other tab
  • 0:25
    right here.
  • 0:26
    And toggle the Region to Block checkbox.
  • 0:31
    So let's save this.
  • 0:34
    And I'll explain you in a moment what we are going to try and do.
  • 0:38
    So this is my full node.
  • 0:39
    And as you can see here, this is the left sidebar of my Bartik theme.
  • 0:47
    And I just want to display some content that's
  • 0:52
    from my node-- let's say that the post date
  • 0:55
    and the author into a block here.
  • 0:58
    So that's pretty easy right now to do with Display Suite.
  • 1:02
    Let's go to Display Suite Layout, Article.
  • 1:08
    Note we are going to theme the Full Content view mode.
  • 1:13
    So with Region to Block plug-in, there
  • 1:17
    is going to be a new field set right here called Block Regions.
  • 1:20
    And then you can create additional regions for this layout.
  • 1:24
    So let's call this Region Name Info, something like that.
  • 1:30
    Let's save it.
  • 1:33
    And then you can see right here, there is a new region
  • 1:37
    right here called Info.
  • 1:38
    So let's move Author and Post Date right there.
  • 1:45
    So we also will put the labels on it.
  • 1:51
    And let's see if we can put something more over there.
  • 1:54
    We could add the tags maybe there.
  • 1:58
    Let's see.
  • 1:59
    Let's also put the tags into the Info.
  • 2:03
    Let's put the label on Hidden.
  • 2:08
    Yeah, they can be linked.
  • 2:10
    So I've put some fields in the Info region over there.
  • 2:14
    So let's save it.
  • 2:17
    So when I go back now to my full node, if I read it on my screen,
  • 2:22
    nothing is going to happen, except the fact
  • 2:24
    that the fields that were here are now gone.
  • 2:27
    So my info should be here-- or I want my info to be here.
  • 2:32
    You have to go to Structure right now, Blocks.
  • 2:39
    And there's going to be a new block available.
  • 2:41
    So let's search it.
  • 2:43
    This is actually the name of the block.
  • 2:47
    So I will configure it.
  • 2:51
    And let's give it a nice title.
  • 2:53
    Let's give it a Article Info.
  • 2:56
    And Bartik can be in the sidebar first.
  • 3:00
    Let's see.
  • 3:01
    You don't really have to add paging stuff.
  • 3:05
    Your block will only be displayed on the node itself.
  • 3:10
    It's as smart as it can be.
  • 3:13
    So we've put the Info block into the sidebar first.
  • 3:19
    Let's put it at.
  • 3:22
    And now let's reload the screen.
  • 3:24
    And there you go.
  • 3:25
    Here's my Article Info block, which takes
  • 3:28
    content from the node over here.
  • 3:30
    So that's the Region to Block feature.
  • 3:33
    There's nothing really more to talk about it.
  • 3:35
    So thank you for watching, and see you in the other screencast.
Loading ...

Region to Block


In this lesson we learn how you can take a display region and create a block out of it to be placed in Drupal core's block system.

Additional resources: