I cannot find a way to override the html.tpl.php in my module. My use case was to create an "interstitial" page to display pre-roll video or an ad, similar to how forbes.com does it. Here is the user story:
"As a user, my first visit to the site will present me with an interstitial page before viewing content. WHen the page is displayed, a cookie is set in the user's browser preventing the interstitial from displaying on subsequent visits for the next 24 hours."
I created a hook_menu creating a page with a path called "welcome"
/**
* Implements hook_menu().
*/
function liveinterstitual_menu() {
$items = array();
$items['welcome'] = array(
'title' => 'Welcome to San Angelo LIVE!',
'page callback' => 'liveinterstitual_welcome_page',
'page arguments' => array(),
'access arguments' => array('access content'),
);
return $items;
}
The page callback is liveinterstitual_welcome_page(), and it looks like this:
function liveinterstitual_welcome_page() {
// If you want the sidebars and everything in the theme layer, uncomment the next line
//return theme('liveinterstitual', array('content' => $content));
//else, to spit out a static html page, save the page to this module's dir and do this:
echo file_get_contents( drupal_get_path('module','liveinterstitual') . '/liveinterstitiual.html');
//Shut down Drupal cleanly
drupal_page_footer();
}
In short, I byassed the entire theme payer by piping the contents of a flat html file. Drupal has similar functions in core that do this by delivering a JSON array for ahah callbacks, for example.
I am open to other ideas, but this one appears to work for now.