Path breadcrumbs Link title for webform submission I have one Webform field call "Name". I use views to retrieve Webform result and edit link. I am using Path breadcrumbs module.

Example:

UserA - Edit
UserB - Edit
UserC - Edit

User A, B, and C had submitted the form. When I click edit, it will goes to their submission form where they can edit the info again.

When I click on the link, I hope breadcrumb will display "Name"

Example:

home > UserA 
instead of  
home > webform

home > UserB 
instead of 
home > webform

home > UserC 
instead of 
home > webform

Name is text. Link is not needed.

Can I add it to breadcrumb link title? How to do that?
I was going to post something with Crumbs, but maybe you can start with something simpler:

I am trying to make this answer useful to different visitors who might have different ideas about their breadcrumb for webform submission pages.

Page access considerations

Do your visitors (those this is meant for) have access to pages like


node/28/submission/1/edit ? (I suppose the answer is yes)
node/28/submission/1 ? (Please check)


With hook_menu_alter()

I'm not sure what this does on a site without Crumbs enabled, but you can give it a try. This will change the page title / navigation title, which I think is used by core for building the breadcrumb.

This means if you had "Submission #1" as part of your breadcrumb, this will replace it with "Submission #2 by NAME".

Consider this code a stub. Especially the $submission-&gt;data[1][0]. This just happened to work for me, but might be different for you. devel dpm() is your friend!

/**
 * @param array[] $items
 */
function d7light_menu_alter(&amp;$items) {

  if (!empty($items['node/%webform_menu/submission/%webform_menu_submission'])) {
    /* @see _d7light_webform_submission_title() */
    $items['node/%webform_menu/submission/%webform_menu_submission']['title callback'] = '_d7light_webform_submission_title';
  }
}

/**
 * @param object $node
 * @param object $submission
 *
 * @return string
 *
 * @see webform_submission_title()
 */
function _d7light_webform_submission_title($node, $submission) {

  if (empty($submission-&gt;data[1][0])) {
    return t('Submission #@serial', array('@serial' =&gt; $submission-&gt;serial));
  }

  return t(
    'Submission #@serial by @name',
    array(
      '@serial' =&gt; $submission-&gt;serial,
      // @todo Maybe something more generic than -&gt;data[1][0]?
      '@name' =&gt; $submission-&gt;data[1][0],
    ));
}


With Easy Breadcrumb + hook_menu_alter()

Tbh I have only tested the code above with Crumbs enabled. So I don't know if it works without it.

I am also quite confident that it will work with Easy Breadcrumb, based on my understanding how it works.

With Crumbs + hook_menu_alter()

As said: You could try if enabling Crumbs makes a difference.

If you do, you might want to check admin/structure/crumbs/display and enable the "show current page".

With the Crumbs API.

This is an alternative to the method above, which does not change the page title but only the name in the breadcrumb.

Here is a starting point.

/**
 * A hook to register crumbs plugins.
 *
 * @param crumbs_InjectedAPI_hookCrumbsPlugins $api
 *   An object with methods to register plugins.
 *   See the class definition of crumbs_InjectedAPI_hookCrumbsPlugins, which
 *   methods are available.
 */
function MYMODULE_crumbs_plugins($api) {

  $api-&gt;routeTitleCallback(
    'node/%/submission/%',
    'webform_submission',
    function($path, array $item) {
      $node = $item['map'][1];
      $submission = $item['map'][3];
      if (0
        || !is_object($node)
        || !is_object($submission)
        || $node-&gt;type !== 'webform'
        || empty($submission-&gt;data[1][0])
      ) {
        return NULL;
      }
      $submission_name = $submission-&gt;data[1][0];
      return $item['title'] . ' (' . check_plain($submission_name) . ')';
    });
}


The same comment applies about $submission-&gt;data[1][0].

Changing the trail

Once you have tried those things, you can ask if you need more. I will then write more in this section.