The problem I can see with your code is the file name for the template file that you declare in your hook_theme()
implementation.
The file name for the template file should be the theme identifier used as array index in the array returned by hook_theme()
(in your case, "profilebuild"); where the identifier uses underscores, the template name should use hyphens.
As example of how the template files are named, see the following hook_theme()
implementations for Drupal core modules.
function book_theme() {
return array(
'book_navigation' => array(
'variables' => array('book_link' => NULL),
'template' => 'book-navigation',
),
'book_export_html' => array(
'variables' => array('title' => NULL, 'contents' => NULL, 'depth' => NULL),
'template' => 'book-export-html',
),
'book_admin_table' => array(
'render element' => 'form',
),
'book_title_link' => array(
'variables' => array('link' => NULL),
),
'book_all_books_block' => array(
'render element' => 'book_menus',
'template' => 'book-all-books-block',
),
'book_node_export_html' => array(
'variables' => array('node' => NULL, 'children' => NULL),
'template' => 'book-node-export-html',
),
);
}
function aggregator_theme() {
return array(
'aggregator_wrapper' => array(
'variables' => array('content' => NULL),
'file' => 'aggregator.pages.inc',
'template' => 'aggregator-wrapper',
),
'aggregator_categorize_items' => array(
'render element' => 'form',
'file' => 'aggregator.pages.inc',
),
'aggregator_feed_source' => array(
'variables' => array('feed' => NULL),
'file' => 'aggregator.pages.inc',
'template' => 'aggregator-feed-source',
),
'aggregator_block_item' => array(
'variables' => array('item' => NULL, 'feed' => 0),
),
'aggregator_summary_items' => array(
'variables' => array('summary_items' => NULL, 'source' => NULL),
'file' => 'aggregator.pages.inc',
'template' => 'aggregator-summary-items',
),
'aggregator_summary_item' => array(
'variables' => array('item' => NULL),
'file' => 'aggregator.pages.inc',
'template' => 'aggregator-summary-item',
),
'aggregator_item' => array(
'variables' => array('item' => NULL),
'file' => 'aggregator.pages.inc',
'template' => 'aggregator-item',
),
'aggregator_page_opml' => array(
'variables' => array('feeds' => NULL),
'file' => 'aggregator.pages.inc',
),
'aggregator_page_rss' => array(
'variables' => array('feeds' => NULL, 'category' => NULL),
'file' => 'aggregator.pages.inc',
),
);
}
Drupal 7 implementations of that hook is slightly different from the implementation done in Drupal 6, but the "template" index is used in the same way in both the versions.
function block_theme() {
return array(
'block_admin_display_form' => array(
'template' => 'block-admin-display-form',
'file' => 'block.admin.inc',
'arguments' => array('form' => NULL),
),
);
}
.tpl
file to your theme, you need to clear your cache again. If the site picks up the module's.tpl
file, it should pick up the theme.tpl
file after you clear the theme registry cache