I’m developing a new Drupal 6 theme with a custom front page. My standard page.tpl.php
has the entire HTML structure (as it should), including the doctype, HTML head, and HTML body.
When I make page-front.tpl.php
, though, I have to duplicate page.tpl.php
and modify it, meaning that whenever I need to make changes to the standard page template (add Javascript, modify CSS, etc.), I have to replicate all those changes in the front page template.
What’s the best way to avoid all this duplication? What’s the best way to keep the main page structure uniform? Create a custom function that spits out the HTML head? Put everything in separate PHP files (header.php, footer.php, etc.) and include them in the two template files?