I'm trying to get the title into my breadcrumb path without using a preprocess function. Drupal 8 Add the current title to the breadcrumb shows how to do it with preprocess function which is not what I'm trying to do.
I want my output be like this:
Here is what have been trying and have not work yet.
breadcrumb.html.twig
{#
/**
* @file
* Theme override for a breadcrumb trail.
*
* Available variables:
* - breadcrumb: Breadcrumb trail items.
*/
#}
{% if breadcrumb %}
<nav class="breadcrumb" role="navigation" aria-labelledby="system-breadcrumb">
<h2 id="system-breadcrumb" class="visually-hidden">{{ 'Breadcrumb'|t }}</h2>
<ol>{{ 'You are here:'|t }}
{% for item in breadcrumb %}
<li>
{% if item.url %}
<a href="{{ item.url }}">{{ item.text }}</a>
{% else %}
{{ item.text }}
{% endif %}
</li>
{{ '>'|t }} {{title}}
{% endfor %}
</ol>
</nav>
{% endif %}
And this is what I'm getting:
For some reason the title is not been display when I use {{ title }}
.
What am I doing wrong?
Why is my title not being displayed on my breadcrumb title?