Overriding Template Files
The template files provided by Drupal core and contributed modules represent the default markup implementation chosen by the original author or team, but every last one of these template files—and the markup and variables printed inside of them—is customizable. When developing a theme, if you decide the default implementation is not going to suit your needs, you can simply choose to override it. Drupal’s theme layer is designed to be extremely flexible and easy to manipulate in this way.
The beauty of theming Drupal sites is that you can easily make changes without having to modify templates where they originate. The process of overriding template files is extremely simple:
- Find the original template file by browsing through code or checking http://api.drupal.org
- Copy and paste it into your theme directory.
- Clear the site cache and reload!
After following these three steps, Drupal will begin using the theme’s version of the file, and you are free to make whatever changes you wish. It’s that simple.