By pushkarpathak on
Hi,
I am using following code to display taxonomy terms associated to a node inside a block
/**
* Prints an unordered list of the terms (as links) that are
* associated to the currently displayed node.
*/
if ( arg(0) == 'node' && is_numeric(arg(1)) ) {
$node = node_load(arg(1));
if (module_exists('taxonomy')) {
$terms = taxonomy_link('taxonomy terms', $node);
print theme('links', $terms, array('class' => 'node-terms'));
} else {
print 'No associated categories.';
}
}
I have 2 vocabulary - topics and author. I want only terms inside topics get listed. Is it possible?
Thanks
Comments
maybe
maybe taxonomy_node_get_terms_by_vocabulary() http://api.drupal.org/api/function/taxonomy_node_get_terms_by_vocabulary/6 - Find all terms associated with the given node, within one vocabulary.
I got success in implementing
I got success in implementing the function
Another option?
Couldn't you put this option into node.tpl.php?