#000000">#0000BB"><?php

#007700">function #0000BB">themename_taxonomy_links#007700">(#0000BB">$node#007700">, #0000BB">$vid#007700">) {

#FF8000">// if the current node has taxonomy terms, get them
 
#007700">if (#0000BB">count#007700">(#0000BB">$node#007700">->#0000BB">taxonomy#007700">)) {

   
#0000BB">$tags #007700">= array();
     foreach (
#0000BB">$node#007700">->#0000BB">taxonomy #007700">as #0000BB">$term#007700">) {
       if (
#0000BB">$term#007700">->#0000BB">vid #007700">== #0000BB">$vid#007700">) {
         
#0000BB">$tags#007700">[] = #0000BB">l#007700">(#0000BB">$term#007700">->#0000BB">name#007700">, #0000BB">taxonomy_term_path#007700">(#0000BB">$term#007700">));
       }
}

    if (
#0000BB">$tags#007700">) {
#FF8000">// get the vocabulary name and name it $name (optional)
//        $vocab = taxonomy_vocabulary_load($vid);
//        $name = $vocab->name;
//        $output .= t("$name") . ": " . implode(' | ', $tags);

// this line outputs just the tags, comment out if you use above method
         
#0000BB">$output #007700">.= #0000BB">implode#007700">(#DD0000">' | '#007700">, #0000BB">$tags#007700">);
    }
  }

     if (
#0000BB">$output#007700">) {
       return
#0000BB">$output#007700">;
     }
}
#0000BB"> 
?>

Add your comment

The content of this field is kept private and will not be shown publicly. If you have a Gravatar account, used to display your avatar.