Answers:
如果您已经有该站点的自定义模块,则可以定义自己的块以重复现有块的内容。然后它将在阻止列表中出现两次
/* -------------------
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;
}
使用MultiBlock模块。
转到结构->块->实例。提供唯一的实例标题,然后选择块类型并保存。然后通过将其分配给所需的区域来启用该块。