Theming and overriding taxonomy term/vocabulary page I have a taxonomy vocabulary (Authors) which is used only for the Books content type. What I would like to achieve is to create a file (taxonomy-term--authors.tpl.php) in which I can customize the HTML markup.


Currently when I create the file I can only more static markup instead of modifying the output of the books which contain the specified term.
I also tried to use the mytheme_preprocess_page() and give a template suggestion but when I add content to the file it's not rendering how I would expect. It does not include header/footer styles and other stuff.


I also tried using Views module but the behavior is similar to first point 1.
You can have full control over the taxonomy/term/ID page by intercepting the menu call with hook_menu_alter() and let the content be generated by a custom function.

This allows you to completely customize the taxonomy term page. You can check for a certain vocabulary ("Authors") and have a custom generated page for that vocab and leave the others untouched.

You can have fine grained control over how results are displayed using view modes and templates.

No contributed modules are needed.

Here is an example to be used in a custom module. The custom content is generated using Drupals EntityFieldQuery because it is a lazy and robust way of generating a list of content, but anything goes here.
.

/**
 * * Implements hook_menu_alter(). 
 */
function YOURMODULE_menu_alter(&amp;$menu) {
  if (isset($menu['taxonomy/term/%taxonomy_term'])) {
    $menu['taxonomy/term/%taxonomy_term']['page callback'] = 'YOURMODULE_taxonomy_term_page';
    $menu['taxonomy/term/%taxonomy_term']['access arguments'] = array(2);
  }
}

/**
 * Callback function for taxonomy/term/%taxonomy_term. 
 * 
 * @param $taxonomy_term object
 * @return * Themed page for a taxonomy term, specific to the term's vocabulary. 
 */
function YOURMODULE_taxonomy_term_page($term) {
  $voc = taxonomy_vocabulary_load($term-&gt;vid);
  switch ($voc-&gt;machine_name) {

    case 'SOMEVOCUBALARY':

      // here you generate the actual content of the page
      // could be done e.g. with an entityfieldquery as follows

      $query = new EntityFieldQuery();
      $query-&gt;entityCondition('entity_type', 'node')
              -&gt;fieldCondition('field_gallery', 'tid', $term-&gt;tid)
              -&gt;propertyOrderBy('sticky', 'DESC')
              -&gt;propertyCondition('status', 1);
      $result = $query-&gt;execute();
      if (!empty($result['node'])) {
        $build['content']['nodes'] = node_view_multiple(node_load_multiple(array_keys($result['node'])), 'teaser'); // output the node teasers. you can control the markup of the 'teaser' view mode with a template in the theme folder
      } else {
        $build['content']['status']['#markup'] = t('No results found for term ID !tid.', array('!tid' =&gt; $term-&gt;tid));
      }
      return $build;

    // If the term page is for an other vocabulary then use Drupal's default taxonomy page 
    default: 
      module_load_include('inc', 'taxonomy', 'taxonomy.pages');
      return taxonomy_term_page($term);
  }
}