Last active
January 20, 2017 05:37
-
-
Save jeremycaldwell/6395084 to your computer and use it in GitHub Desktop.
Drupal 6/7 - Embed block in node
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$block = module_invoke('views', 'block' , 'view', 'fanvision_news-block_1'); | |
print $block['content']; | |
?> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$block = block_load('system', 'main-menu'); | |
$content = _block_get_renderable_array(_block_render_blocks(array($block))); | |
$output = drupal_render($content); | |
echo $output; | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hover over the block's configuration link on the Blocks page to get the machine name.
Example: my_view-block