Adding a non-link element to the end of the breadcrumb For example, in a "blog post" page I'd like the breadcrumb to display like this:


  Blog > Recipes > Recipe


I'm controlling all breadcrumbs from a single place, a class that implements BreadcrumbBuilderInterface. Its build method looks like this:

public function build(RouteMatchInterface $route_match) {
  $b = new Breadcrumb();

  $node = $route_match-&gt;getParameter('node');

  if ($node &amp;&amp; $node-&gt;getType() == 'blog_post') {
    $b-&gt;addLink(Link::createFromRoute($this-&gt;t('Blog'), 'blog.home'));
    $b-&gt;addLink(Link::createFromRoute($this-&gt;t('Recipes'), 'blog.recipes_landing'));

    //I want this next item to not be a link, and to show "Recipe" and not the node title.
    //$b-&gt;addLink(Link::createFromRoute($this-&gt;t('Recipe'), 'nothing!'));
  }

  return $b;
}


How can I make this happen? I saw somewhere (not sure where, in a code comment perhaps) that this last item is supposed to be added in the theme layer, but I don't want to split my logic, especially since I don't just want all breadcrumbs to show the page title as the last item (instead, for example, I want it to say "Recipe" if the content type is blog_post).
You can do almost like in your suggestion. You just need to use '&lt;none&gt;' instead of 'nothing!'.

$b-&gt;addLink(Link::createFromRoute($this-&gt;t('Recipe'), '&lt;none&gt;'));