Block output and Views output in theme with module_invoke

Every now and then i need to make some custom output of a block, either in some page.tpl.php file or in a drupal interface custom block, either way you can get it with module_invoke function

       $block = module_invoke('nice_menus', 'block', 'view', 1);         print $block['content'];

And you pass arguments to this module invoke function, first a hook (nice menus here) than state its a block type, then a view as we are going to view it and number 1 is delta of it. You can check all of this information when hovering on edit on block adminstration page.If you want to output a view then you can do it easier with this command

       print views_embed_view('banner','block_4',$some_argument);