Adaptivetheme for Drupal 7 is HTML5 and includes many template overrides in the core theme that have been converted to use HTML5. When selecting templates to override you should always look in the core base theme first, to see if an override exists already, and if so copy it for inclusion in your sub-theme.

Here is a list of templates Adaptivetheme overrides by default - you will find all these in adaptivetheme/adaptivetheme/templates/:


Using Template Overrides in your Sub-theme

First create a new directory in your sub-theme, I usualy call this "templates", but you can name it whatever you want. The important thing is to keep track of where your templates are - I find its easiest to use one folder for all templates.

Copy and paste your template into this folder, either from Adaptivetheme core (if the template exists there, copy and paste it), otherwise copy from the module that is supplying the template. There are many more templates in Drupal core, and a lot of contrib modules have templates also - for example the Views module makes heavy use of templates.

After you have added a new template you must clear the sites cache - go to the Performance settings page and clear the cache, or if you are using the Admin menu module simply flush the theme registry. This will allow Drupal to see the new template and start using it. If you do not do this Drupal won't know about the new tpl file and your edits will have no effect.

Special Templates in Adaptivetheme

We have included a field.tpl.php file in the theme but we do not use it by default - this is why it is named field.tpl.php.txt, if you wish to override field.tpl.phpin your subtheme copy this file to your sub-theme and rename it to field.tpl.phpand clear the cache. Be careful when overriding this template, a lot of modules and fields rely on its output.

This is a basic page.tpl.phpoverride that has extra markup to support 100% width header and footer type designs. Simply copy this to your sub-theme and rename it page.tpl.phpto use (and clear the cache).

This template provides markup for any menu placed in the Menu Bar region - be extremely weary of overriding this template, the CSS for styled sub-themes relies heavily on the markup and classes in this template. In fact I would say just leave this one alone, unless you really really need to change it for some reason.

Template Suggestions

Adaptivetheme provides additional support for extra template suggestions for blocks, it allows you to have "block--[region]--[module].tpl.php" type suggestions so you can override block templates for a particular module depending on what region it appears in. This can be quite useful when you need to do this - the code is in adaptivetheme_preprocess_block(&$vars):

// Provide template suggestions such as block--header--search, or block--menu-bar--menu
$vars['theme_hook_suggestions'][] = 'block__' . $vars['block']->region . '__' . $vars['block']->module;

You can learn more about available template suggestions for Drupal 7 by referring to the official documentation page: