Block: controlling content in regions

Last modified: October 24, 2009 - 02:53

Blocks are the boxes of content that can be displayed in regions on your page.

Blocks are made available to your site most commonly by enabling modules. 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 (Administer > 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 themes and Regions in Drupal 5 and earlier 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 Administer >> Block.
  • add a block at Administer >> Block >> Add block.

Is there any way to duplicate a block?

jack_ruby - February 17, 2009 - 14:42

How can I duplicate a block. For instance, I want the "latest" content on the front page, and also on the sidebar of all pages?

block can't reposition

usahasul - February 28, 2009 - 16:22

Can anyone help me to explain why I can't position blocks in my website anymore, when i position blocks then press save blocks after that no change for blocks position, the blocks still can configures. i not experiences this problem before.

Am having the same problem.

mashie - March 23, 2009 - 07:59

Am having the same problem. Found a solution? If so, kindly share it.

I, too, am having this

dakotaroar - April 9, 2009 - 20:47

I, too, am having this problem.

blocks are drag-and-drop

nadezhda - March 31, 2009 - 18:55

Had the same question but discovered you don't have to weight them anymore. Just drag them to reorder.

Facts are facts, but perception is reality.

Block ordering

reclaimthemedia - May 1, 2009 - 00:41

I like the drag and drop interface, but often my instructions don't "stick," and move around in seemingly random order. I wish there was a way to impose a weight value numerically.

How to disable drag n drop interface

novice.drupaler - September 11, 2009 - 01:17

To disable drag and drop interface on admin/build/block, just disable javascript in your webbrowser

Having the same problem

Intertextual - May 6, 2009 - 09:49

Suddenly this problem appears. Even If I drag and drop to other position and then save. Block don't move to the desired position.

If I find a workaround for this I will post it here.

La esperanza continúa intacta.-

Solution found

Intertextual - May 6, 2009 - 10:55

I uninstalled my Panels module and blocks started to work again.

La esperanza continúa intacta.-

I got rid of a bunch of

dakotaroar - July 1, 2009 - 00:46

I got rid of a bunch of blocks and switched themes, which seems to work.

want to hide a block

Sindhu - June 5, 2009 - 05:18

i want to hide a block at runtime.....user shd b given permission to customize the blocks at runtime.... i am working with 4seasons and acquai marina theme..... if anyone know how to do help me out.....

thanks....

My right side block

Smokin Joe - June 7, 2009 - 17:55

All of a sudden it now appears at the bottom of the page content. I try to use the admin to move it to the right side, assign it weight and it still goes to the bottom of the center. argh.

Anyone else have this issue?

Complete lack of block visibility/order control

snorkers - June 10, 2009 - 19:48

I now no longer have any control over the order or visibility of my blocks using admin/build/block. Currently have to manipulate directly the blocks table in MySQL, as changes via the Drupal interface are not reflected. Weightings are particularly troublesome.
Apart from a few updates to contrib modules, nothing else significant has changed in my current project config. Interested to find out what could be affecting this.

Use of separate admin theme

snorkers - July 1, 2009 - 18:00

Not sure why, but if I use a difference theme for Administration, then any changes to the block layout are only reflected in the Admin theme, rather than System Default, even if I select the appropriate theme at the top of the page admin/build/block. The only way round this is to use as the Admin theme.

A temp fix for me

litelus - September 3, 2009 - 12:38

I updated like 15 modules in my site and the system module, and it seemed i can't rearrange my blocks. What i notice is really happening is that the action is being saved, but the admin page doesn't display the new changes.
What I do is after i rearrange my blocks, i navigate away to another page (like the themes page) and then back to the blocks page. Then everything is where it should be.
I notice this problem in other forms in drupal after this module/core update.

 
 

Drupal is a registered trademark of Dries Buytaert.