Lately, I have been doing some tweaks to Drishtikone which may not have been apparent. Drupal follows a file system that where the nodes, pages, blocks etc follow a certain hierarchy and priority. Since I will be using this information, I wanted to lay it down in one place for future use:
Example: Your home page.
comments from drupal.org page:
1. When determining which template file to use, it’ll start from the top and work its way down. So, for example, if node-type.tpl.php file doesn’t exist, it’ll use node.tpl.php. For a better look as to how templates work, take a look at the phptemplate.engine file in your themes/engines/phptemplate folder.
2. All the template naming suggestions are set from phptemplate.engine. Peek in that file and look for phptemplate_HOOK. In Drupal 5, there’s a callback function that accepts templates for the last parameter. Once you understand what it’s doing, you can go a lot further and change it to your liking with _phptemplate_variables() by passing $vars[‘template_files’] with an array of your own suggestions.
For additional discussion visit these pages: Using DIff Page Templates . Hierarchy of Templates