How to add a tpl file to a block from a custom module I have a custom module that build a block. I'm trying to add a tpl file, but I don't get nothing.
This is my code:

&lt;?php
/**
 * Implements hook_block_info().
 *
 * This hook declares what blocks are provided by the module.
 */
function tados2_block_info() {
  $blocks = array();

  $blocks['block_with_tpl'] = array(
    // info: The name of the block.
    'info' =&gt; t('Tados2 example: block with tpl'),
    'status' =&gt; TRUE,
  );

  return $blocks;
}
/**
 * Implements hook_block_view().
 *
 * This hook generates the contents of the blocks themselves.
 */
function tados2_block_view($delta = '') {
  switch ($delta) {
    case'block_with_tpl':
      // The subject is displayed at the top of the block. Note that it
      // should be passed through t() for translation. The title configured
      // for the block using Drupal UI supercedes this one.
      $block['subject'] = t('Tados2 block with tpl');
      // The content of the block is typically generated by calling a custom
      // function.
      $block['content'] = t('Hola mundo');//_tados2_block_with_tpl_contents();
    break;
  }
  return $block;
}
?&gt;


I'm trying to move the content to a tpl.php file.

This what I'm trying:

&lt;?php
/**
 *
 * Implementen hook_theme
 *
 */
function tados2_theme(){
  return array(
    'tados2_block' =&gt; array(
      //'render element' =&gt; 'elements',
      'template' =&gt; 'tados2_block',
      'variables' =&gt; array('title' =&gt; NULL, 'content' =&gt; NULL),
    ),
  );
}
/**
 * preprocess function
 * 
 */ 
function template_preprocess_tados2_block(&amp;$variables) {
  dpm($variables);
}
?&gt;
You have to call your theming function:

$block['content'] = theme('tados2_block', array('title' =&gt; 'foo', 'content' =&gt; 'bar'));