Knowledgebase

How to configure, move and add blocks in Drupal

Blocks are boxes that display some information or are used for a specific function. Examples on the frontend of the site are the user login block, the search block, etc. Each Drupal theme is divided into different regions. Blocks can be put into these regions, removed from them, and also moved from one region to another.

To manage these blocks, log in to the admin panel of your Drupal, click on the Structure tab in the top navigation bar, and on the page that opens click on Blocks. This will display a table with the enabled and disabled blocks, and the regions in which they are displayed in the default theme. To see how the regions are arranged on the frontend click on the Demonstrate block regions button that's above the top left corner of the table. If you have enabled other themes, you can use the tabs that are in the top right corner of the page to manage the blocks for the other themes.

As we mentioned, the table on the Blocks page lists all the regions and the enabled blocks in each region. Each block has a drop-down menu set to the region in which the block is shown. To move the block to another region just select the region from the drop-down menu. To disable the block, select None from the drop-down menu. Another way to move blocks is to use the four-arrow button that's in front of the name of each block. At the bottom of the table are listed all the disabled blocks. Again, you can enable them either by using the drop-down menu to select the region in which you want to put the block, or by dragging and dropping the block in the desired spot using the four-arrow button.

Each block also has a configure button. Click on it to change the settings of the block. You can change its title, you can change the regions in which it's displayed for all the enabled themes, and you can also change the visibility settings. The visibility settings allow you to restrict where and to whom the block is displayed. You can make the block visible only on certain pages, for certain content types; you can make it visible only to users belonging to a particular user role(s), and you can also allow individual users to choose whether the particular block should be visible or not when they log in to their account on your site.

To add a custom block click on the Add block button. It's above the top left corner of the table on the Blocks page of the admin panel. Then configure the settings. You have to type a title, description, then add a body, specify the regions and optionally configure the visibility settings.

For some more details and screenshots you can also read the Drupal blocks tutorial.

Was this answer helpful?

 Print this Article

Also Read