=== modified file 'wikitools.module'
--- wikitools.module	2008-02-25 09:22:43 +0000
+++ wikitools.module	2008-04-01 11:55:21 +0000
@@ -431,11 +431,15 @@
       // Single match for title.
       $node = current($found_nodes);
       if ($subpage) {
-        drupal_goto("node/$node->nid/$subpage");
+        $url = "node/$node->nid/$subpage";
       }
       else {
-        drupal_goto("node/$node->nid");
+        $url = "node/$node->nid";
       }
+      // Set query path so that the tabs from the node get displayed.
+      menu_set_active_item($url);
+      // Generate the node.
+      $output = menu_execute_active_handler($url);
     }
     else if (count($found_nodes) > 1) {
       // Multiple match for title.
@@ -470,6 +474,21 @@
 }
 
 /**
+ * Implementation of template_preprocess_page().
+ */
+function wikitools_preprocess_page(&$variables)
+{
+  $node = $variables['node'];
+  if ($node && wikitools_type_affected($node->type) && wikitools_subpages_handling() == 'url' && $variables['tabs'])
+  {
+    // Re-write the tab links to reflect the wiki path.
+    $orig = "node/$node->nid";
+    $dest = wikitools_wikilink_drupal_path($node->title);
+    $variables['tabs'] = str_replace($orig, $dest, $variables['tabs']);
+  }
+}
+
+/**
  * Implementation of hook_nodeapi().
  */
 function wikitools_nodeapi(&$node, $op, $form = NULL, $a4 = NULL) {

