I just want to show the vocabulary name that the node belongs to next to the terms which I know is simply print $terms I know of print $vid but that is just the vocabulary id number and I want to show the name not the id. Is this just as simple to do?

Comments

arhip’s picture

Try using taxonomy_get_vocabularies


$voc = taxonomy_get_vocabularies();

print $voc[$vid]->name;

cs8c’s picture

Okay! Thank you very much I got this working today, somehow last night I must have been so tired that I wasn't inputing the code correctly. This works perfectly, but only thing is somehow I'm not getting the matching vocabulary to my terms

biglazy’s picture

You used the wrong vid,here the vid must be the vocabulary's vid , but you used the node's vid .
Maybe you can find the right way in the post: http://drupal.org/node/750936, notice the comment #2 .

subir_ghosh’s picture

This does not work for Drupal 6.

-----------------------------
Subir Ghosh
www.subirghosh.in