Skip to content

Instantly share code, notes, and snippets.

@jeremyjaymes
Created April 27, 2012 11:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jeremyjaymes/2508589 to your computer and use it in GitHub Desktop.
Save jeremyjaymes/2508589 to your computer and use it in GitHub Desktop.
Node Term Template
<?php
/**
* Node-term.tpl function
* Add this to your theme's template.php, replace "mytheme" with your theme's name
*/
function mytheme_preprocess_node(&amp;$vars) {
foreach ($vars['node']->taxonomy as $term) {
$vars['template_files'][] = 'node-term-'. $term->tid;
}
}
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment