Index: webform.module =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/webform/webform.module,v retrieving revision 1.148 diff -u -r1.148 webform.module --- webform.module 10 Jan 2010 07:03:27 -0000 1.148 +++ webform.module 10 Jan 2010 07:19:04 -0000 @@ -1185,6 +1185,7 @@ if (isset($submission->sid)) { drupal_set_title(t('Submission #@sid', array('@sid' => $submission->sid))); + webform_set_breadcrumb($node, $submission); } // Set a header for navigating results. @@ -1736,6 +1737,7 @@ */ function _webform_confirmation($node) { drupal_set_title(check_plain($node->title)); + webform_set_breadcrumb($node); if (empty($output)) { $output = theme(array('webform_confirmation_'. $node->nid, 'webform_confirmation'), $node, $_GET['sid']); } @@ -2384,6 +2386,29 @@ } /** + * Set the necessary breadcrumb for the page we are on. + */ +function webform_set_breadcrumb($node, $submission = NULL) { + $breadcrumb = drupal_get_breadcrumb(); + + if (isset($node)) { + $webform_breadcrumb = array(); + $webform_breadcrumb[] = array_shift($breadcrumb); + $webform_breadcrumb[] = l($node->title, 'node/' . $node->nid); + if (isset($submission)) { + $last_link = array_shift($breadcrumb); + $webform_breadcrumb[] = l(t('Submissions'), 'node/' . $node->nid .'/submissions'); + if (isset($last_link)) { + $webform_breadcrumb[] = $last_link; + } + } + $breadcrumb = $webform_breadcrumb; + } + + drupal_set_breadcrumb($breadcrumb); +} + +/** * Implementation of hook_views_api(). */ function webform_views_api() { Index: includes/webform.submissions.inc =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/webform/includes/webform.submissions.inc,v retrieving revision 1.1 diff -u -r1.1 webform.submissions.inc --- includes/webform.submissions.inc 15 Jun 2009 20:31:02 -0000 1.1 +++ includes/webform.submissions.inc 10 Jan 2010 07:19:05 -0000 @@ -96,6 +96,7 @@ */ function webform_submission_delete_form($form_state, $node, $submission) { drupal_set_title(t('Delete Form Submission')); + webform_set_breadcrumb($node, $submission); $form = array(); $form['node'] = array('#type' => 'value', '#value' => $node); Index: includes/webform.report.inc =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/webform/includes/webform.report.inc,v retrieving revision 1.3 diff -u -r1.3 webform.report.inc --- includes/webform.report.inc 10 Jan 2010 07:03:27 -0000 1.3 +++ includes/webform.report.inc 10 Jan 2010 07:19:04 -0000 @@ -26,6 +26,7 @@ $header = theme('webform_results_submissions_header', $node); if ($user_filter) { drupal_set_title(t('Submissions for %user', array('%user' => $user->name))); + webform_set_breadcrumb($node); $submissions = webform_get_submissions($node->nid, $header, $user->uid, $pager_count); $count = webform_get_submission_count($node->nid, $user->uid); }