This module allows themes to define their own blocks.

You probably only need this if a theme has asked you to install it or if you are a themer and you want to declare some blocks without creating your own module.

Why? The code to define a simple block is easy to create, but also very easily abstracted. Why not provide it as a simple feature for themers to use, without having to create a custom module?

Usage for themers

To define a block you just add a line to your theme.info file:

theme_blocks[BLOCKNAME][template] = TEMPLATE

BLOCKNAME is a unique identifier for the block, and TEMPLATE is the name of the file in your theme folder to use for the block. For example, to create a block for an advert I have stored in my theme in a file called advertisment.tpl.php I would add the following to theme.info:

theme_blocks[myadvert][template] = advertisment

Notice that the .tpl.php is not required on the end of the template name. The block name is a unique name for the block, and should be lowercase letters and underscores.

See the README.txt file for details of further options and more advanced usage.

Maintainer: Darren Mothersele

Project Information

Downloads