Created
April 27, 2012 11:43
-
-
Save jeremyjaymes/2508589 to your computer and use it in GitHub Desktop.
Node Term Template
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Node-term.tpl function | |
* Add this to your theme's template.php, replace "mytheme" with your theme's name | |
*/ | |
function mytheme_preprocess_node(&$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