diff --git taxonomy_filter.module taxonomy_filter.module
index 07af49e..f427e74 100644
--- taxonomy_filter.module
+++ taxonomy_filter.module
@@ -521,7 +521,14 @@ function taxonomy_filter_get_link_tids($url_tids, $item_tid, $context = NULL) {
   drupal_alter('tf_link_tids', $link_tids, $item_tid, $context);
   return $link_tids;
 }
-
+function taxonomy_filter_taxonomy_filter_format_path($tids=array(),$depth = 0,$op = '') {
+  return array(
+    '%tids'=> implode(',', $tids),
+    '%depth'=> ($depth) ? $depth : '',
+    '%op'=> ($op) ? $op : '',
+    '//'=>'/'
+  );
+}
 /**
  * generates paths for items.
  */
@@ -529,14 +536,8 @@ function _taxonomy_filter_format_path($tids, $depth, $op = NULL) {
   // if no tids return empty path (TODO do we need this check?)
   if (!$tids) return '';
   $template = variable_get('taxonomy_filter_output', TAXONOMY_FILTER_OUTPUT);
-  $tid_str = implode(',', $tids);
-  $depth_str = ($depth) ? $depth : '';
-  $op_str = ($op) ? $op : '';
-
-  $raw_url = str_replace('%tids', $tid_str, $template);
-  $raw_url = str_replace('%depth', $depth_str, $raw_url);
-  $raw_url = str_replace('%op', $op_str, $raw_url);
-  $raw_url = str_replace('//', '/', $raw_url);
+  $replacements = module_invoke_all('taxonomy_filter_format_path',$tids,$depth,$op);
+  $raw_url = strtr($template,$replacements);
   $raw_url = trim($raw_url, '/');
 
   $url = drupal_get_path_alias(str_replace('%2C', ',', url($raw_url)));
@@ -564,6 +565,7 @@ function taxonomy_filter_get_url_tokens() {
     $args[] = $arg;
     $argnum++;
   }
+  $filters = array_keys(module_invoke_all('taxonomy_filter_format_path'));
   foreach ($filter_array as $filter_line) {
     $tids = NULL; // reset url variables
     $depth = NULL;
@@ -582,19 +584,13 @@ function taxonomy_filter_get_url_tokens() {
           break;
         }
       }
-      if ($filter_bit == '%tids') {
-        $tids = $args[$i];
-      }
-      elseif ($filter_bit == '%depth') {
-        $depth = $args[$i];
-      }
-      elseif ($filter_bit == '%op') {
-        $op = $args[$i];
+      if (in_array($filter_bit,$filters)){
+        $tokens[trim($filter_bit,'%')] = $args[$i];
       }
     }
-    if ($tids) {
-      $tokens = array('tids' => $tids, 'depth' => $depth, 'op' => $op);
-      return $tokens;
+    
+    if ($tokens['tids']) {
+     return $tokens;
     }
   }
   $tokens = array('tids' => NULL, 'depth' => NULL, 'op' => NULL);
