Drupal: How to Redefine Taxonomy Term Page
From the previous article we get know of how to display list of nodes on a term page. And now it is time to speak about redefining taxonomy term page. This article would tell you how to replace list of node teasers with an optional content on a term page.
Taxonomy term page shows teasers of a node with a specified tag by default. You should redefine content output on this page.
Insert this code to template.php:
/**
* Override or insert PHPTemplate variables into the templates.
*/
function phptemplate_preprocess_page(&$vars, $hook) {
if ($hook == ‘page’ && $vars[‘template_files’][1]==’page-taxonomy-term’) {
$vars[‘content’] = ‘new content';
}
}
And enjoy the result!