Now that we know the idea behind blocks in Drupal 7, we can create a new block. In the following tutorial we'll show you how to create a new block in Drupal 7. We'll also review the various settings that each block can be configured with.

To create a new block in Drupal 7:

  1. Log into Drupal 7 as an administrator
  2. In the top menu, click Structure
  3. Click Blocks
  4. Click Add block
  5. There are several fields that we need to fill out for this new block. We've outlined these values below.

    Initial Block Settings

    Block title Enter a title for your block. If you enable the option to show a title for your block, this is what will show.
    Block description The block description is used primarily to identify this particular block in your Drupal 7 admin section. If you had 20 different blocks for example, unique descriptions will help you organize and manage your blocks more efficiently.
    Block body The block body is the bulk of your block. For example, if you were creating a block to show social media icons, the HTML code would be entered in the Block body.
    Text format The Text format controls if and how your block body will be filtered. For example, there are some options that allow HTML code and others that don't. If you select a different Text format from the drop down menu, you will see the text below it change to highlight the details of the particular format that you selected.

    Creating our Block How it will appear on our site
    creating-a-new-block how-the-block-displays-on-our-site

    Region Settings

    The region settings allow you to setup where each of your blocks will appear. Beneath each listed theme, select the region to display the block in. In order to know how to choose a region, you'll first need to know where each region is within your theme. Keep in mind too that you can change the region blocks are assigned to at any time.

    Visibility settings

    Pages The Pages setting allows you to restrict which pages this block will be displayed in. For example, if you had a block that showed a Google map of where your business is located, you may only what that block to show in your Contact Us page.
    Content types The Content types setting allows you to control which content types this block will appear with.
    Roles The Roles setting allows you to specify which types of users can see this block. For example, if you only want logged in users to be able to see the block, you can specify that here.
    Users Drupal 7 gives each user the ability to customize how your site will display for them, this includes the option to show or hide certain blocks. If you want users to be able to toggle on/off the display of this block, you'll do that within the Users settings.
  6. When you are finished configuring your block, click the Save block button at the bottom of the page. You should now be able to visit your site and view your new block (depending on the Region Settings as described above).
Did you find this article helpful?

We value your feedback!

Why was this article not helpful? (Check all that apply)
The article is too difficult or too technical to follow.
There is a step or detail missing from the instructions.
The information is incorrect or out-of-date.
It does not resolve the question/problem I have.
How did you find this article?
Please tell us how we can improve our Support Center:
Email Address
Optional, but our team may contact you for more information.
Like this Article?

Post a Comment

Name:
Email Address:
Comment:
Are you a bot?
Submit

Please note: Your name and comment will be displayed, but we will not show your email address.

Write New!
Do you want to publish a tutorial to our support center?

News / Announcements

SSL Certficate Warnings
Updated 2014-04-14 11:34 am EST
Hits: 2229
Heartbleed 0-day OpenSSL security bug
Updated 2014-04-14 04:43 pm EST
Hits: 5653

Related Questions

Here are a few questions related to this article that our customers have asked:
Ooops! It looks like there are no questions about this page.
Would you like to ask a question about this page? If so, click the button below!
Ask a Question

Need more Help?

Search

Ask the Community!

Get help with your questions from our community of like-minded hosting users and InMotion Hosting Staff.

Current Customers

Chat: Click to Chat Now E-mail: support@InMotionHosting.com
Call: 888-321-HOST (4678) Ticket: Submit a Support Ticket

Not a Customer?

Get web hosting from a company that is here to help. Sign up today!