diff -uNr vocabindex/theme/vocabindex_admin_vi_form.tpl.php vocabindex.show_children/theme/vocabindex_admin_vi_form.tpl.php
--- vocabindex/theme/vocabindex_admin_vi_form.tpl.php	2009-09-15 16:02:41.000000000 +0100
+++ vocabindex.show_children/theme/vocabindex_admin_vi_form.tpl.php	2009-09-15 16:13:05.000000000 +0100
@@ -18,7 +18,8 @@
   $name = drupal_render($form[$id . 'name']);
   $list_style = drupal_render($form[$id . 'view']);
   $node_count = drupal_render($form[$id . 'node_count']);
-  array_unshift($rows, array($name, NULL, $list_style, $node_count));
+  $show_children = drupal_render($form[$id . 'show_children']);
+  array_unshift($rows, array($name, NULL, $list_style, $node_count, $show_children));
   // The path/enable form field.
   if ($type == VOCABINDEX_VI_PAGE) {
     $rows[0][1] = drupal_render($form[$id . 'path']);
@@ -29,7 +30,7 @@
 }
 
 // Set the table header.
-$header = array(t('Vocabulary'), NULL, t('View'), t('Node counts'));
+$header = array(t('Vocabulary'), NULL, t('View'), t('Node counts'), t('Show children'));
 if ($type == VOCABINDEX_VI_PAGE) {
   $header[1] = t('Path');
 }
diff -uNr vocabindex/theme/vocabindex_link.tpl.php vocabindex.show_children/theme/vocabindex_link.tpl.php
--- vocabindex/theme/vocabindex_link.tpl.php	2009-09-15 16:02:41.000000000 +0100
+++ vocabindex.show_children/theme/vocabindex_link.tpl.php	2009-09-15 16:13:55.000000000 +0100
@@ -24,4 +24,7 @@
   $title = $term->description;
 }
 
+// check to see if we should display all children underneath this term
+if ($vi->show_children) $term->path .= "/all";
+
 echo l($term->name, $term->path, array('html' => TRUE, 'attributes' => array('title' => $title)));
\ No newline at end of file
diff -uNr vocabindex/vocabindex.admin.inc vocabindex.show_children/vocabindex.admin.inc
--- vocabindex/vocabindex.admin.inc	2009-09-15 16:02:41.000000000 +0100
+++ vocabindex.show_children/vocabindex.admin.inc	2009-09-15 16:13:05.000000000 +0100
@@ -227,6 +227,11 @@
       '#type' => 'checkbox',
       '#default_value' => $vi->node_count,
     );
+
+    $form[$id . 'show_children'] = array(
+      '#type' => 'checkbox',
+      '#default_value' => $vi->show_children,
+    );
   }
 
   $form['vocabindex_type'] = array(
@@ -257,6 +262,7 @@
     $vi->path = array_key_exists($id . 'path', $values) ? preg_replace('#^/|/$#', '', drupal_strtolower($values[$id . 'path'])) : NULL;
     $vi->view = $values[$id . 'view'];
     $vi->node_count = $values[$id . 'node_count'];
+    $vi->show_children = $values[$id . 'show_children'];
     $vi->enabled = isset($values[$id . 'enabled']) && $values[$id . 'enabled'] == TRUE || !empty($values[$id . 'path']) ? TRUE : FALSE;
 
     vocabindex_vi_save($vi);
@@ -276,7 +282,7 @@
  *   Type: object; The VI to save.
  */
 function vocabindex_vi_save($vi) {
-  db_query("UPDATE {vocabindex} SET path = '%s', view = %d, node_count = %d, enabled = %d WHERE vid = %d AND type = %d", $vi->path, $vi->view, $vi->node_count, $vi->enabled, $vi->vid, $vi->type);
+  db_query("UPDATE {vocabindex} SET path = '%s', view = %d, node_count = %d, show_children = %d, enabled = %d WHERE vid = %d AND type = %d", $vi->path, $vi->view, $vi->node_count, $vi->show_children, $vi->enabled, $vi->vid, $vi->type);
   if ($vi->type == VOCABINDEX_VI_BLOCK && $vi->enabled == FALSE) {
     db_query("DELETE FROM {blocks} WHERE module = 'vocabindex' AND delta = %d", $vi->vid);
   }
diff -uNr vocabindex/vocabindex.install vocabindex.show_children/vocabindex.install
--- vocabindex/vocabindex.install	2009-09-15 16:02:41.000000000 +0100
+++ vocabindex.show_children/vocabindex.install	2009-09-15 16:13:05.000000000 +0100
@@ -8,30 +8,66 @@
 
 /**
  * Implementation of hook_schema().
- */function vocabindex_schema() {
+ */
+function vocabindex_schema() {
   module_load_include('module', 'vocabindex');
 
-  $schema['vocabindex'] = array(    'description' => t('The table in which the settings for Vocabulary Index are stored.'),    'fields' => array(      'vid' => array(        'description' => t('The VID associated with this index.'),        'type' => 'int',
+  $schema['vocabindex'] = array(
+    'description' => t('The table in which the settings for Vocabulary Index are stored.'),
+    'fields' => array(
+      'vid' => array(
+        'description' => t('The VID associated with this index.'),
+        'type' => 'int',
         'unsigned' => TRUE,
         'default' => 0,
-        ),      'path' => array(        'description' => t('The path to a Vocabulary Index page.'),        'type' => 'varchar',
+        ),
+      'path' => array(
+        'description' => t('The path to a Vocabulary Index page.'),
+        'type' => 'varchar',
         'length' => '255',
-        'default' => '',        ),      'view' => array(        'description' => t('The view, a tree or a flat list for instance.'),        'type' => 'int',
+        'default' => '',
+        ),
+      'view' => array(
+        'description' => t('The view, a tree or a flat list for instance.'),
+        'type' => 'int',
+        'size' => 'tiny',
+        'default' => VOCABINDEX_VIEW_TREE,
+        ),
+      'node_count' => array(
+        'description' => t('Whether to count nodes per term.'),
+        'type' => 'int',
         'size' => 'tiny',
-        'default' => VOCABINDEX_VIEW_TREE,        ),      'node_count' => array(        'description' => t('Whether to count nodes per term.'),        'type' => 'int',
+        'default' => 0,
+        ),
+      'show_children' => array(
+        'description' => t('Whether to show all children in results.'),
+        'type' => 'int',
         'size' => 'tiny',
-        'default' => 0,        ),      'type' => array(        'description' => t('Index page or index block.'),        'type' => 'int',
+        'default' => 0,
+        ),
+      'type' => array(
+        'description' => t('Index page or index block.'),
+        'type' => 'int',
         'size' => 'tiny',
-        'default' => 0,        ),      'enabled' => array(        'description' => t('Indicates whether this index is enabled or not.'),        'type' => 'int',
+        'default' => 0,
+        ),
+      'enabled' => array(
+        'description' => t('Indicates whether this index is enabled or not.'),
+        'type' => 'int',
         'size' => 'tiny',
-        'default' => 0,        ),
+        'default' => 0,
+        ),
       ),
       'indexes' => array(
         'vocabindex_vid' => array('vid'),
         'vocabindex_type' => array('type'),
-      ),    );
-    return $schema;}
-
+      ),
+    );
+  
+  return $schema;
+}
+
+
 /**
  * Implementation of hook_install().
  */function vocabindex_install() {  drupal_install_schema('vocabindex');
diff -uNr vocabindex/vocabindex.test vocabindex.show_children/vocabindex.test
--- vocabindex/vocabindex.test	2009-09-15 16:02:41.000000000 +0100
+++ vocabindex.show_children/vocabindex.test	2009-09-15 16:13:05.000000000 +0100
@@ -24,6 +24,7 @@
     $vi->path = $this->randomName();
     $vi->view = $views[mt_rand(0, 2)];
     $vi->node_count = mt_rand(0, 1);
+    $vi->show_children = mt_rand(0, 1);
     $vi->enabled = TRUE;
     $vi->vid = $vid;
     $vi->type = $type;
