Return Terms from Specific Vocab Only?

Posts: 110
Joined: 05/28/2008

I'm looking for a way to get a node's terms, but only from a specific vocab. I need this for a couple of different things, but right now I was looking through the uc_google_base module and noticed it was marking product type as all of the terms. If uc_manufacturer is installed, however, this adds the manufacturer into the product type tag instead of the brand tag as it should be.

The code for getting all of the terms, as it is right now: implode(',', $terms)
How can I split that up into ones only under specific vocabularies?

Thanks!

Posts: 2357
Joined: 08/07/2007
AdministratoreLiTe!

Try using taxonomy_node_get_terms_by_vocabulary(). Give it the node id and the vocab id and you get an array of terms.

Posts: 110
Joined: 05/28/2008

thanks!