Nodes in block

Nodes in block makes it possible to add nodes into a block. A number of configurable blocks are generated which you can assign to a region. Visibility settings of this block are automatically set to 'Show on only the listed pages'. On the node content form, you define the weight and visibility per node thus making it easier for content administration as all your content is now in the same place. With this module, you don't have to explain your customers how blocks work but is still able to decide on which pages content must be rendered.

If you set the visibility setting for the block as "Show on every page except the listed pages", multiple paths will not work correct because of the way that Drupal core block visibility works. You'll be better off choosing the default option.

Nodes in block also adds support for the Display suite module in Drupal 6. Drupal 7 has view modes and is thus build in automatically.

Theming

Every node in the block can be rendered as a teaser or page in Drupal 6. Drupal 7 uses view modes and is build in automatically. An extra property is added to the node object which you can use in your node template file to make theming even more easier.

<?php
// node.tpl.php
if (isset($node->nodesinblock)) {
 
// Theming for node in block
}
else {
 
// Normal theming
}
?>

Comparison with other modules

The major difference with modules like Teaser block, Node Blocks and Node as block is that this module doesn't create a new block for every node. Nodes in block uses its own hook_block implementation to render content in a block and makes it possible to render multiple nodes in one block and to set the visibility per node in that block. Administrators assign a block to a region and content administrators only have to configure on which page they want to show one node or more nodes in that region.

A "node blocks" comparison page is available at http://groups.drupal.org/node/93499

Project Information

Downloads