Display block only on a specific page I would like to display a block only on the [root]/dashboard page, and I would like to do this from my custom module defining the block, not from the Drupal admin interface. How can I do this? Thanks you!

Also, where would this condition be better to be written? In hook_block_view() within the module or in the block template file?
The code would go in hook_block_info(). You can use the pages property to define the list of pages the block should be shown on. e.g.

$blocks['recent'] = array(
  'info' =&gt; t('Recent content'),
  'pages' =&gt; 'dashboard',
  'visibility' =&gt; BLOCK_VISIBILITY_LISTED
);