Printing a block in node.tpl.php Would appreciate it if someone could let me know how to print a block in node.tpl.php. I basically have a block created through a view and I haven't set a region for that block as I would like to do is display this block in a specific position in all my node pages. 

This is what I did in my theme's template file:

function mytheme_preprocess_node(&amp;$vars) {
  $vars['my_block'] = mytheme_block_render('views', 'myblock-block_1');
}

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


And in my node.tpl.php file, I just do:

&lt;?php print $my_block; ?&gt;


However, this is giving me a memory limit exhausted error.  I can get it to work perfectly if I render the block in mytheme_preprocess_page function and print it in page.tpl.php, but I need to print this in node.tpl.php.  I tried the following as well:

function mytheme_block_render($module, $block_id) {
  $block = module_invoke('views', 'block_view', 'myblock-block_1');
  return render($block);
}


That is giving me the same memory exhausted error.  Is it too later to render a block in the node preprocess function?  Why can I render it in the page preprocess function but not in node?  Is there some other preprocess function that we can render it in and then have access to it in node.tpl.php?
I think module_invoke() is correct and you can simply call that in your tpl file. However,

use 

print $block['subject'];

print $block['content'];


instead of 

print render($block);


Also

D6 and earlier:

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


D7:

$block = module_invoke('module_name', 'block_view', 'block_delta');
print render($block['content']);


Refer 


http://drupal.org/node/359021 
http://drupal.org/node/26502


for more some more help.