You are here

readme.txt in OG Vocabulary 5

Same filename and directory in other branches
  1. 6 README.txt
  2. 7 README.txt
Description
-----------------
Adds a categories tab to all group home pages where group admins may add/edit their own vocabularies. This enables groups to structure their content.

Themes
-------------------
You might want to group your terms by vocab on the node display. Here is a snippt from groups.drupal.org for node.tpl.php which does so:

<?php if ($links || $terms) { ?>
<div class="links">
   <div class="left">
    <?php if ($terms  && !$is_preview) { ?>
       <?php 
			 	  // group terms by vocab
			    foreach ($node->taxonomy as $tid => $term) {
				    $vocabs[$term->vid][$term->tid] = l($term->name, "taxonomy/term/$tid");
				  }
				  krsort($vocabs);

				  //render a line for each vocab. performs a query to get vocab name
				  foreach ($vocabs as $vid => $vocab) {
					  $fullvocab = taxonomy_get_vocabulary($vid);
					  $output .= "<div id=\"node-vocab-$vid\">". $fullvocab->name. ': '. theme('links', $vocab). "</div>";
					}
			 ?>
       <div class="terms"><?php print $output; ?></div>
    <?php } ?>
   </div>
   <?php if ($links) { ?>
     <div class="right">» <?php print $links?></div>
   <?php } ?>&nbsp;
</div>
<?php }; ?>

Author
------------------
Moshe Weitzman <weitzman AT tejasa.com

Sponsors
------------------
Buyblue - http://buyblue.org
Green Party of Canada - http://www.greenparty.ca

File

readme.txt
View source
  1. Description
  2. -----------------
  3. Adds a categories tab to all group home pages where group admins may add/edit their own vocabularies. This enables groups to structure their content.
  4. Themes
  5. -------------------
  6. You might want to group your terms by vocab on the node display. Here is a snippt from groups.drupal.org for node.tpl.php which does so:
  7. // group terms by vocab
  8. foreach ($node->taxonomy as $tid => $term) {
  9. $vocabs[$term->vid][$term->tid] = l($term->name, "taxonomy/term/$tid");
  10. }
  11. krsort($vocabs);
  12. //render a line for each vocab. performs a query to get vocab name
  13. foreach ($vocabs as $vid => $vocab) {
  14. $fullvocab = taxonomy_get_vocabulary($vid);
  15. $output .= "
    ". $fullvocab->name. ': '. theme('links', $vocab). "
    ";
  16. }
  17. ?>
  • »
  •  
  • Author
  • ------------------
  • Moshe Weitzman
  • Sponsors
  • ------------------
  • Buyblue - http://buyblue.org
  • Green Party of Canada - http://www.greenparty.ca