Showing posts with label Drupal7. Show all posts
Showing posts with label Drupal7. Show all posts

Wednesday, November 11, 2015

Drupal – how to display block in anywhere

Drupal Use the following code 
//Drupal7
$block = module_invoke('module_name', 'block_view', 'block_delta');
print render($block['content']);

//Drupal6 and earlier
$block = module_invoke('module_name', 'block', 'view', 'block_delta');
print $block['content'];

This links:https://www.drupal.org/node/26502