Index: custom_breadcrumbs.admin.inc
===================================================================
RCS file: /cvs/drupal/contributions/modules/custom_breadcrumbs/custom_breadcrumbs.admin.inc,v
retrieving revision 1.1.2.3.2.10
diff -u -r1.1.2.3.2.10 custom_breadcrumbs.admin.inc
--- custom_breadcrumbs.admin.inc	30 May 2009 22:02:07 -0000	1.1.2.3.2.10
+++ custom_breadcrumbs.admin.inc	14 Jun 2009 01:17:05 -0000
@@ -190,6 +190,14 @@
     '#collapsible'    => TRUE,
   );
 
+ $form['adv_settings']['custom_breadcrumbs_set_menu_breadcrumb'] = array(
+    '#type' => 'checkbox',
+    '#title' => t('Use the menu structure to set the breadcrumb trail'),
+    '#default_value' => variable_get('custom_breadcrumbs_set_menu_breadcrumb', FALSE),
+    '#description' => t("When checked, the default breadcrumb trail will be patterned after the page's placement in the menu structure. Note that this default can be superceded by other custom breadcrumbs."),
+    '#weight' => -30,
+  );
+
   $form['adv_settings']['custom_breadcrumbs_force_active_trail'] = array(
     '#type' => 'checkbox',
     '#title' => t('Force the active trail'),
Index: custom_breadcrumbs.module
===================================================================
RCS file: /cvs/drupal/contributions/modules/custom_breadcrumbs/custom_breadcrumbs.module,v
retrieving revision 1.6.2.5.2.12
diff -u -r1.6.2.5.2.12 custom_breadcrumbs.module
--- custom_breadcrumbs.module	12 Jun 2009 15:15:47 -0000	1.6.2.5.2.12
+++ custom_breadcrumbs.module	14 Jun 2009 00:28:59 -0000
@@ -85,6 +85,16 @@
 }
 
 /**
+ * Implementation of hook_init().
+ */
+function custom_breadcrumbs_init() {
+  if (variable_get('custom_breadcrumbs_set_menu_breadcrumb', FALSE)) {
+    // Use default menu structure to set the breadcrumb.
+    custom_breadcrumbs_set_menu_breadcrumb();
+  }
+}
+
+/**
  * Implementation of hook_perm().
  */
 function custom_breadcrumbs_perm() {
@@ -461,6 +471,17 @@
 }
 
 /**
+ * Helper function to set the breadcrumb trail to match the menu structure
+ * Using the same approach as in the menu_breadcrumb module.
+ */
+function custom_breadcrumbs_set_menu_breadcrumb() {
+  $menu_item = menu_get_item();
+  $menu_link = menu_link_load(db_result(db_query("SELECT mlid FROM {menu_links} WHERE link_path = '%s'", $menu_item['href'])));
+  $use_menu = $menu_link['menu_name'];
+  menu_set_active_menu_name($use_menu);
+}
+
+/**
  * Implementation of hook_theme_registry_alter().
  */
 function custom_breadcrumbs_theme_registry_alter(&$theme_registry) {
Index: custom_breadcrumbs_views.module
===================================================================
RCS file: /cvs/drupal/contributions/modules/custom_breadcrumbs/custom_breadcrumbs_views/Attic/custom_breadcrumbs_views.module,v
retrieving revision 1.1.2.6
diff -u -r1.1.2.6 custom_breadcrumbs_views.module
--- custom_breadcrumbs_views.module	12 Jun 2009 15:15:47 -0000	1.1.2.6
+++ custom_breadcrumbs_views.module	14 Jun 2009 00:25:17 -0000
@@ -63,6 +63,10 @@
       return;
     }
   }
+  if (variable_get('custom_breadcrumbs_set_menu_breadcrumb', FALSE)) {
+    // If a views breadcrumb has not been defined for this view, then use default menu structure.
+    custom_breadcrumbs_set_menu_breadcrumb();
+  }
 }
 
 /**
