Index: taxonomy_context.module =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/taxonomy_context/taxonomy_context.module,v retrieving revision 1.72.2.2 diff -u -u -p -r1.72.2.2 taxonomy_context.module --- taxonomy_context.module 23 Jan 2007 04:49:44 -0000 1.72.2.2 +++ taxonomy_context.module 24 Apr 2007 21:12:37 -0000 @@ -256,15 +256,16 @@ function taxonomy_context_get_context() $context = array('tid' => NULL, 'root_tid' => NULL, 'nid' => NULL, "vid" => NULL); $mode = arg(0); switch ($mode) { - case 'taxonomy': + default: switch (arg(1)) { case 'vocabulary': $context['tid'] = 0; $context['root_tid'] = 0; $context['vid'] = ((int)arg(2)) ? arg(2) : 1; break; - case 'term': - $tidcurrs = preg_split('/[+ ,]/', arg(2)); + default: + $tid = module_invoke_all('taxonomy_context'); + $tidcurrs = preg_split('/[+ ,]/', implode(',', $tid)); $context['tid'] = $tidcurrs[0]; $top_parent = array_pop(taxonomy_get_parents_all($context['tid'])); $context['root_tid'] = $top_parent->tid; @@ -287,14 +288,16 @@ function taxonomy_context_get_context() $context['vid'] = $term->vid; } break; - default: - break; } $context = (object) $context; } return $context; } +function taxonomy_context_taxonomy_context() { + return arg(2); +} + /** * Return the breadcrumb of taxonomy terms ending with $tid. */