Blocks OUTSIDE Sidebars (above content, below it etc)

Last modified: November 11, 2007 - 11:19

I am not an expert but have written this as I've noticed it's a common question, and I had to work out the answer for my own live case. I would have no objections to any better qualified person replacing this page with a "proper" one.

If you want to use Blocks outside Sidebars then you need to apply them to Regions.

General solution - if no suitable Region in your Theme, is to add one or more as needed. Links below should help if you are new to Regions.

Regions in PHPTemplate - http://drupal.org/node/29139
How to Build your Front Page with Regions - http://drupal.org/node/65064
Using Different Block Templates for Different Blocks, Regions etc. - http://drupal.org/node/104319

A common request is "putting blocks in a row above the content".

I have seen three ways suggested, the last of which is mine, but I take the first two on good faith. Option A certainly seems the proper way to handle a single row of Blocks, and with the right CSS could no doubt wrap for grid effects, whereas Option C is the one I use for a Grid of Blocks.

Option A

1) Create a Region - Before Content.
2) Create/assign Blocks to that Region.
3) Use weighting and float:left to line them up in order

Option B

Use MiniPanels - part of Panels 2 - http://drupal.org/project/panels

This was suggested by the author of the Panels Module.

Option C

(No doubt should be done with CSS, but I'm not a good designer).

1) Create a Region for each column of Blocks.
2) Put them into a single row table in page.tpl.php
3) Create and assign Blocks to Regions, weighting them so that they appear at the right place in each column.

Live example of method C at www.likal.com/uk/gloucester

 
 

Drupal is a registered trademark of Dries Buytaert.