templates

Drupal theming gotcha #1 - overriding template files

Tags: 

As I've been delving into Drupal theming I've discovered lots of gotchas.

The first one for today - when creating a sub-theme, if you want to override a template for a specific purpose you need to copy the parent theme's original file into your subtheme. A common example is wanting to have a custom page template for the hompage, which entails copying page.tpl.php to page-front.tpl.php. Because of a bug, aka poorly thought out "feature", your sub-theme must have a copy of both page-front.tpl.php and page.tpl.php.

This particular issue really comes into play when building a sub-sub-theme, but that's for a different post.

Subscribe to templates