Trouble getting block to display after module enabled I've created a drupal module, it's info file, and a tpl.php for the block all in the same module directory.  When I enable the module, I can see the block listed and assign it to a region.  However when I view the page the block does not display.  If I do a vardump on $content within block_view, the dump displays at the top of the page, and firebug shows that block is wrapped with the right div tags.  I would think if you did a var dump on within the block_view function, it should display in the right region.  This one is probably really simple, but it's got me stumped - any help much appreciated.  Also if I title the block just to see if it shows up anywhere in the page - it's still nowhere to be seen even though admin shows it it in the region, and no filters are set to prevent it being viewed.  I would think that if you gave the block a title -if it's on the page it would at least show a title even if everything else is blank.

module file:

function my_block_block_info() {
   $blocks['my_block'] = array(
      'info' =&gt; t('My Block')
   );
   return $blocks;
}

function my_block_block_view() {

if(arg(0) == 'node' &amp;&amp; is_numeric(arg(1)))  {
    $id = arg(1);
}     
   $query = "SELECT * FROM table WHERE id= :id AND deleted=0";
   $args = array(':id' =&gt; $id);  
   $result = db_query($query,$args)-&gt;fetchAll();
   foreach($result as $item) {
     $stuff[] = array($item-&gt;stuff_url,$item-&gt;stuff_name);
   }
   $content=
      theme_render_template(drupal_get_path('module','my_module').'/'.'block--         my_block.tpl.php',array("stuff" =&gt; $stuffs));
   return $content;
   }

 block--my_block_tpl.php

&lt;div class="wrapper"&gt;
 &lt;?php      

 foreach($stuffs as $thing) {
 for($i=0; $i &lt; count(thing); $i++) {
       //print out result passed from module
  } 
  }
 ?&gt;
 &lt;/div&gt;
your hook_block_view() is implemented in a wrong way,


first pass in argument delta as a parameter
you should put the contents of your block inside the $block['content'] variable.
return $block;


heres a very good tutorial
building a custom block