Quantcast
Channel: drupal 7
Viewing all articles
Browse latest Browse all 19

Embed Drupal block region into node page

$
0
0

Snippet to insert or embed Drupal block region into a node template.

First of all, define the block region in your theme's .info file.

YOUR_THEME.info

...
regions[BLOCK_REGION_NAME] = Block region name
...

In your theme's template.php file, place the following code into template_preprocess_node. If it does not exist, define it with the code below:
Replace BLOCK_REGION_NAME with your custom block region machine name.


Viewing all articles
Browse latest Browse all 19

Trending Articles