Skip to content

Instantly share code, notes, and snippets.

@bratsun
Created September 4, 2013 09:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bratsun/6434700 to your computer and use it in GitHub Desktop.
Save bratsun/6434700 to your computer and use it in GitHub Desktop.
$block = module_invoke('module', 'block_view', 'delta');
print render($block['content']);
$block = block_load('multiblock', 3);
$render_array = _block_get_renderable_array(_block_render_blocks(array($block)));
$output = render($render_array);
print $output;
if (arg(0) == 'node' && is_numeric(arg(1))) {
$active_trail = menu_get_active_trail();
end($active_trail);
$nid = 1; // change to nid of parent node you want to check
if ($active_trail[1] && $active_trail[1]['link_path'] == 'node/'.$nid) {
return true;
} else {
return false;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment