Hi,<br><br>There is a rookie question.<br><br>I use template_preprocess_page function in a module to specify a template file (news.tpl.php) based on the hook_menu path (?q=news), utilizing the news.tpl.php every time click on ?q=news, it works fine. <br>
<br>But I have to copy the footer&header from page.tpl.php to the new template file (news.tpl.php) to print them, I wonder if there is an approach to inherit automatically the footer and header section?<br><br>here is the code<br>
<br>function news_menu(){<br> $items['news'] = array(<br> 'title' => 'News',<br> 'page callback' => 'news_page_default',<br> 'access callback'=>TRUE,<br>
'type' => MENU_CALLBACK,<br> );<br><br> return $items;<br>}<br><br>function template_preprocess_page(&$variables){<br><br> if(drupal_strtolower(arg(0))=='news'){<br> $variables['template_file']='news' ;<br>
}<br> <br>}<br><br>Thanks <br><br>Wang<br><br>