Posted By

JuliaKM on 10/24/07


Tagged

textmate drupal taxonomy


Versions (?)

Who likes this?

2 people have marked this snippet as a favorite

basicmagic
kellyharding


Get Taxonomy Terms for a Vocabulary


 / Published in: HTML
 

  1. <?php if (count($taxonomy)): ?>
  2. <?php
  3. $terms = taxonomy_node_get_terms_by_vocabulary($node->nid, 1);
  4. foreach ($terms as $term) {
  5. $tags[] = l($term->name, taxonomy_term_path($term));
  6. }
  7. if ($tags){
  8. print t("Professional Areas") . ": " . implode(' | ', $tags);
  9. } ?>
  10. <br />
  11. <?php
  12. $terms = taxonomy_node_get_terms_by_vocabulary($node->nid, 2);
  13. foreach ($terms as $term) {
  14. $tagsTwo[] = l($term->name, taxonomy_term_path($term));
  15. }
  16. if ($tagsTwo){
  17. print t("Focus Areas") . ": " . implode(' | ', $tagsTwo);
  18. }?>
  19. <?php endif; ?>

Report this snippet  

You need to login to post a comment.