Drupal Tutorial Part 3 - Blocks and Regions
Ok, now to perhaps the most confusing aspect in all of Dru-topia, blocks and regions. Once again I remember trying to work through what a block was and more importantly what the heck a region was. Arg! Make the pain stop.
The long and short of it is, a region is an area that can contain a block and a block is a section of content.
So before I even go into how to set up regions and blocks let me tell you why you will want blocks.
Why you should care about Blocks?
Blocks, what are they good for? Blocks are good for displaying content that you want on multiple pages. For example you might want to have a login block on every page if the user isn’t logged in. Or another example is maybe you want to have a Google Adsense block on every page except the front page. Blocks save you time and effort. The easiest way to think of blocks is to equate them to super duper includes. Like a left-side sidebar that will only appear on image pages and user profile pages. Blocks give you flexibility, remember that!
Why you should care about Regions
Regions are important only because they allow you to place blocks in them. Think of a region as a block of space on a webpage. In that space you can have multiple blocks. However because blocks are so flexible you can have multiple blocks occupy that region on different pages. An example would be to have a login block on the front page in your left region and on the userpage having a user avatar block occupy that left side region. Once again think about the little Russian dolls, the region is the bigger doll and the block is the smaller doll that fits inside of the bigger doll.
Next: Now that everyone understands what a block is, next I’ll post about how to style blocks, adjust block visibility, share my top 10 block articles, and give tips on how to add regions .
drupal open source web 2.0





February 22nd, 2007 at 1:00 am |
Thanks. Nice, clear and helpful.
Keep um coming…
February 23rd, 2007 at 8:24 pm |
Sure thing. Sharing is caring.