We Recommend

HTML: The Definitive Guide HTML: The Definitive Guide
They teach you that learning HTML is like learning any other language and that reading a book of rules can only take you so far. Readers begin writing what may be their first Web page just two pages into the book's second chapter. From there on, they provide a wide range of HTML coding to allow readers to learn from good examples. The book includes a handy "cheat sheet" of HTML codes for quick reference.


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.