| Versionen | |
|---|---|
| drupal6 – drupal7 | taxonomy_term_path($term) |
For vocabularies not maintained by taxonomy.module, give the maintaining module a chance to provide a path for terms in that vocabulary.
$term A term object.
An internal Drupal path.
modules/
<?php
function taxonomy_term_path($term) {
$vocabulary = taxonomy_vocabulary_load($term->vid);
if ($vocabulary->module != 'taxonomy' && $path = module_invoke($vocabulary->module, 'term_path', $term)) {
return $path;
}
return 'taxonomy/term/' . $term->tid;
}
?>
Kommentare
Kommentar hinzufügen