--- includes/content_taxonomy.token.inc Sat Aug 30 19:25:30 2008 +++ includes/content_taxonomy.token.inc Wed Apr 1 16:34:16 2009 @@ -8,6 +8,7 @@ function content_taxonomy_token_list($ty $tokens = array(); $tokens['content_taxonomy']['term'] = t('Name of top taxonomy term'); + $tokens['content_taxonomy']['termpath'] = t('Name of top taxonomy term and its supercategories separated by /'); $tokens['content_taxonomy']['tid'] = t('ID of top taxonomy term'); $tokens['content_taxonomy']['terms'] = t('Names of all taxonomy terms separated by commas'); $tokens['content_taxonomy']['tids'] = t('IDs of all taxonomy terms separated by commas'); @@ -39,7 +40,13 @@ function content_taxonomy_token_values($ if ($vid) { $vocabulary = taxonomy_vocabulary_load($vid); } + $parents = taxonomy_get_parents_all($tids[0]); + foreach ($parents as $parent) { + $pnames[] = check_plain($parent->name); + } + + $tokens['termpath'] = implode('/',array_reverse($pnames)); $tokens['terms'] = implode(', ', $terms); $tokens['tids'] = implode(', ', $tids); $tokens['term'] = $terms[0];