12

Is there a module which can allow users to place the same block in multiple regions? That way I don't have to make the same View block twice.

6 Answers 6

16

Multiblock module makes this possible:

Drupal's block module is limited by the fact that a block can only have one instance. Each block has a 1:1 relationship with its region, weight, visibility (and other) settings. This means that it is impossible to have blocks in multiple regions or to have blocks that have different settings on different pages. MultiBlock module solves this problem by allowing you to create multiple Block Instances of already existing blocks.

6

It is unclear if you want to use the same block more than once on the same page or place it in different regions on different pages. Either way I would recommend you take a look at the context module.

Using context you can place a block with in different regions on different pages. Alternatively you can create 2 contexts which apply to the same page/s and place the same block in different regions.

1
  • 2
    It should be noted that this doesn't appear to work when putting a block twice within the same region. It appears that Context can only put one copy of a block per region.
    – Jeff
    Commented May 20, 2015 at 16:32
3

The Panels module also makes it easy to use multiple instances of the same block on a page.

2

If you already have a custom module for the site, you can define your own blocks to repeat the content of an existing block. It will then appear twice in the block listing

/* -------------------
    custom blocks
----------------- */

/**
* Declare what blocks are provided by this module.
* Implements hook_block_info().
*/
function MYMODULE_block_info(){

    $block['fibble_home'] = array(
        'info' => t('fibble (home)'),
        'cache' => DRUPAL_CACHE_PER_ROLE,
    );
    $block['fibble_members'] = array(
        'info' => t('fibble (members)'),
        'cache' => DRUPAL_CACHE_PER_ROLE,
    );
    return $block;
}

/**
* Define what our block is going to look like.
* Implements hook_block_view().
*/
function MYMODULE_block_view($block_key){
    $block = array();

    // tweets block to appear twice

    if($block_key == 'fibble_home' || $block_key == 'fibble_members'){ 

        //This is the title of the block.
        $block['subject'] = t('Fibble');

        $fblock = module_invoke('MODULE_ORIGINAL_BLOCK', 'block_view', 'ID_ORIGINAL_BLOCK');
        $fcontent = render($fblock['content']);

        $block['content'] = '<!-- content repeated by MYMODULE -->';
        $block['content'] .= $fcontent;

    }

    return $block;
}
1

Use the MultiBlock Module.

Go to Structure->Blocks->Instances. Give a unique instance title and select the block type and save. Then enable the block by assigning it to a region where you want.

2
  • 2
    The whole process is explained after enabling Multiblock module. Commented Aug 25, 2014 at 11:41
  • @SaayantaAcharyyaChoudhury Then you should have edited the original answer to make it better instead of writing another answer.
    – dayuloli
    Commented Mar 12, 2015 at 8:17
0

The Bean module also now has this functionality. Not just for custom block entities but also for blocks defined in hook_block. See the dev version and the bean_all submodule.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.