/[drupal]/contributions/modules/taxonomy_context/taxonomy_context.module
ViewVC logotype

Diff of /contributions/modules/taxonomy_context/taxonomy_context.module

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph | View Patch Patch

revision 1.72.2.7.2.7, Thu Feb 26 18:10:56 2009 UTC revision 1.72.2.7.2.8, Mon Oct 5 18:36:31 2009 UTC
# Line 1  Line 1 
1  <?php  <?php
2  // $Id: taxonomy_context.module,v 1.72.2.7.2.6 2009/02/21 14:51:05 nancyw Exp $  // $Id: taxonomy_context.module,v 1.72.2.7.2.7 2009/02/26 18:10:56 nancyw Exp $
3  /**  /**
4   * @file   * @file
5   * Create a block as a hierarchical menu tree for each vocabulary.   * Create a block as a hierarchical menu tree for each vocabulary.
# Line 467  function taxonomy_context_term_page($tid Line 467  function taxonomy_context_term_page($tid
467              $subterm_output .= theme('taxonomy_context_subterm', $subterm, TRUE);              $subterm_output .= theme('taxonomy_context_subterm', $subterm, TRUE);
468              break;              break;
469          }          }
470            if (module_exists('taxonomy_image')) {
471              $subterm_output .= l(taxonomy_image_display($subterm->tid), taxonomy_term_path($subterm), null, null, null, null, true);
472            }
473        }        }
474      }      }
475    }    }
# Line 484  function taxonomy_context_term_page($tid Line 487  function taxonomy_context_term_page($tid
487        $term_output .= theme('taxonomy_context_term', $term, FALSE, $subterm_output, $subterm_display);        $term_output .= theme('taxonomy_context_term', $term, FALSE, $subterm_output, $subterm_display);
488        break;        break;
489    }    }
490      if (module_exists('taxonomy_image')) {
491        $term_output .= l(taxonomy_image_display($term->tid), taxonomy_term_path($subterm), null, null, null, null, true);
492      }
493    
494    
495    return theme('taxonomy_context_term_page', $term_output);    return theme('taxonomy_context_term_page', $term_output);
496  }  }
# Line 732  function taxonomy_context_menu_item_link Line 739  function taxonomy_context_menu_item_link
739        break;        break;
740      case 'term':      case 'term':
741        $term = taxonomy_get_term($id);        $term = taxonomy_get_term($id);
742          if (module_exists('taxonomy_image')) {
743            $term->image = l(taxonomy_image_display($term->tid), taxonomy_term_path($subterm), null, null, null, null, true);
744          }
745          else {
746            $term->image = NULL;
747          }
748        $item = array('title' => $term->name, 'path' => taxonomy_term_path($term), 'description' => $term->description ? strip_tags(node_teaser($term->description)) : t('View this section'));        $item = array('title' => $term->name, 'path' => taxonomy_term_path($term), 'description' => $term->description ? strip_tags(node_teaser($term->description)) : t('View this section'));
749        break;        break;
750    }    }
751    
752    if ($theme) return theme('menu_item_link', $item, $item);    if ($theme) {
753    else return array(      return theme('menu_item_link', $item, $item);
754      'title'      => $item['title'],    }
755      'href'       => $item['path'],    else {
756      'attributes' => ! empty($item['description']) ? array('title' => $item['description']) : array(),      return array(
757    );        'title'      => $item['title'],
758          'href'       => $item['path'],
759          'attributes' => !empty($item['description']) ? array('title' => $item['description']) : array(),
760          );
761      }
762  }  }
763    
764    

Legend:
Removed from v.1.72.2.7.2.7  
changed lines
  Added in v.1.72.2.7.2.8

  ViewVC Help
Powered by ViewVC 1.1.2