How to configure a block?

Directly from Working with blocks ( with additional screenshots:

Blocks are the boxes of content (such as "User Login" or "Who's online") that can be displayed in regions (such as footer or sidebar) on your page.

Blocks are made available to your site most commonly by enabling modules. Once created, a Block can be modified to adjust its appearance, shape, size and position - or which Website pages it appears on. For example, enabling the core Poll module makes the "Most Recent Polls" block available for you to place in a region. Also note that some modules provide multiple blocks when enabled, others may not define new blocks.

Blocks are placed in regions via the Block Admin page Dashboard > Structure > Blocks .

Your site's theme defines the regions available. Therefore, block placement in regions is done per theme on the Block Admin page. If you have more than one theme enabled on your site blocks can be placed differently for each theme.

You can learn more about regions on the Regions in Drupal 6 and 7 themes pages.

The block management screen also lets you specify the vertical sort-order of the blocks within a theme region. In Drupal 6 or later this can be done by dragging blocks to the desired position. Prior to Drupal 6 (or when Javascript is not enabled), you do this by assigning a weight to each block. Lighter blocks (smaller weight) "float up" towards the top of the region. Heavier ones "sink down" towards the bottom of it.

The block management screen also provides checkboxes (depending on your version of Drupal and what modules you have enabled), as well as a configure link, which takes you to the configuration screen. The checkboxes and configuration page let you customize the visibility of the block. A block's visibility depends on:

  • Whether it is Enabled and assigned to a region. Disabled blocks (blocks not assigned to any region in your theme) are never shown.
  • The Throttle checkbox (if you have the Throttle module enabled). Throttled blocks are hidden during high server loads.
  • Page-specific visibility settings. Individual blocks can be configured to only show/hide on certain pages. You can also show/hide blocks based on the result of a PHP snippet.
  • Custom visibility settings. Individual blocks can be configured so that users decide whether to show/hide certain blocks.
  • Its function. Dynamic blocks (such as those defined by modules) may be empty on certain pages and will not be shown.

The block management screen also has an "Add block" link. This allows you to define a block containing content of your choice. Each administrator-defined block consists of a title, a description, and a body which can be as long as you wish; the Drupal engine will render the content of the block.

You can

enable, throttle, place, and configure blocks at Dashboard >> Structure >> Blocks (Drupal 7).
add a block at Dashboard >> Structure >> Blocks >> Add (Drupal 7).

The visibility of a block is defnied by the area "Pages" in the last screenshot. In the associated text field either the URL short paths where the block should not or should appear.

Subscribe to Comments for "How to configure a block?"