You are here

function menu_attach_block_block_render in Menu Attach Block 7

Helper function to render a block's HTML.

Parameters

string $module: Name of module that implements the block.

string $delta: Unique ID of the block.

Return value

string HTML of rendered block.

See also

http://drupal.org/node/26502#comment-4705330

2 calls to menu_attach_block_block_render()
menu_attach_block_link in ./menu_attach_block.module
Override theme_link().
menu_attach_block_render_ajax_block in ./menu_attach_block.module
Prints block content, suitable for use with AJAX callbacks.

File

./menu_attach_block.module, line 469
Module to enable adding a block to menu item.

Code

function menu_attach_block_block_render($module, $delta) {
  $block = block_load($module, $delta);
  $block_content = _block_render_blocks(array(
    $block,
  ));
  $build = _block_get_renderable_array($block_content);
  $block_rendered = drupal_render($build);
  return $block_rendered;
}