I have one page mortgages/%/view that needs to have it's own custom theme. I have the HTML created and it's ready to go. In my 'mortgage' module I have a mortgage.tpl.php file with this HTML in it.
My hook_menu looks like this:
function mortgage_menu() {
$items = array();
$items['mortgage/%/view'] = array(
'page callback' => 'mortgage_callback',
'page argument' => array(3), //pass 3rd argument of url -- 1. drupal 2. mortgage 3. %
'access callback' => TRUE,
'type' => MENU_CALLBACK,
);
return $items;
}
Then my callback function and mortgage_theme function look like this:
function mortgage_callback() {
return theme('mortgage');
}
/*
* Implementation of hook_theme().
*/
function mortgage_theme(){
return array (
'mortgage' => array (
'template' => 'mortgage' ,
'arguments' => array(),
),
);
}
This successfully calls my mortgage.tpl.php file into my mortgage/%/view page. HOWEVER, it only displays in the middle of my "content" section instead of correctly overriding the theme. Obviously this isn't correct.
How would I get this mortgage.tpl.php file to be THE theme file for this specific page?
e/ Mortgage is NOT a node. It's a custom module which allows users to get a full page view of mortgage details.