You are here

function taxonomy_breadcrumb_get_vocabulary_path in Taxonomy Breadcrumb 5

Return the administrator defined vocabulary path for a given vocabulary ($vid). If a path doesn't exist, NULL is returned.

3 calls to taxonomy_breadcrumb_get_vocabulary_path()
taxonomy_breadcrumb_form_alter in ./taxonomy_breadcrumb.module
Implementation of hook_form_alter(). This must be used over hook_taxonomy to add the Breadcrumb Path fields to the vocabulary and term forms. The hook_taxonomy function does not provide a way to obtain the vid or tid of the vocabulary or term.
taxonomy_breadcrumb_generate_breadcrumb in ./taxonomy_breadcrumb.module
If the current drupal path (q=) is /node/nid, generate the breadcrumb trail based on nid.
taxonomy_breadcrumb_taxonomy in ./taxonomy_breadcrumb.module
Implementation of hook_taxonomy(). This implementation checks to see if a vocabulary or term is being updated and makes the necessary changes in the taxonomy_breadcrumb database tables.

File

./taxonomy_breadcrumb.module, line 58
The taxonomy_breadcrumb module generates taxonomy based breadcrumbs on node pages and taxonomy/term pages. The breadcrumb trail takes on the form: [HOME] >> [VOCABULARY] >> TERM >> [TERM] ...

Code

function taxonomy_breadcrumb_get_vocabulary_path($vid) {
  $result = db_query("SELECT path FROM {taxonomy_breadcrumb_vocabulary} WHERE vid = %d", $vid);
  $path = NULL;
  if ($row = db_fetch_array($result)) {
    $path = $row['path'];
  }
  return $path;
}