Check out template_preprocess_block. You can do this with the following code in your theme's template.php
file:
function MYTHEME_preprocess_block(&$variables) {
// Perform a check based on any parameter, e.g. block ID.
if ($variables['block_html_id'] == 'block-system-main') {
// This will lookup for block--system-main-block.tpl.php file in your
// theme.
$variables['theme_hook_suggestions'] = 'block__system_main_block';
}
}
However, Drupal already looks for various template names, before it settles down for the default block.tpl.php
. Here is the list:
- block--block--[block-id].tpl.php
- block--[module]--[delta].tpl.php
- block--[module].tpl.php
- block--[region].tpl.php
- block.tpl.php
See this page for more information.