if the taxonomy term is unused do not list in menu

sapark - January 21, 2009 - 16:18
Project:Jump
Version:6.x-1.x-dev
Component:Code
Category:feature request
Priority:normal
Assigned:Unassigned
Status:closed
Description

here's a one-line change that keeps unused terms from showing up in the jump menu:

in jump.module replace the old jump_menu_get_taxo_options function with

function jump_menu_get_taxo_options(&$options, $vid) {
  $tree = taxonomy_get_tree($vid);
  foreach ($tree as $term) {
    if (taxonomy_term_count_nodes($term->tid) !=0) {
      $options[taxonomy_term_path($term)] = $term->name;
    }
  }
}

#1

sapark - January 29, 2009 - 18:09
Status:active» closed
 
 

Drupal is a registered trademark of Dries Buytaert.