(Tips) Drupal - how to display block in node?

Tips : Drupal - how to display block in node?

There used to be a module that did this, but I forget what it's called, and am unsure as to its compatibility with various versions of Drupal. The easiest and most direct way to place the contents of a block in a page are using the following PHP snippet:

<?php
$block = module_invoke('menu', 'block', 'view', 26);
print $block['content'];
?>

Placing any Drupal block within a node

In this particular example, we're displaying a menu block with ID 26 inside a page. Here's how you use this code snippet to insert any block (this example uses Drupal 5.x; for other Drupal versions, the process should be similar):

  • Browse to Site Building -> Blocks -> List
  • Browse over the "configure" link next to your block

| Read more..

Courtesy : Community.contractwebdevelopment.com