Skip to content
Snippets Groups Projects

Issue #3254436: Alternative title not working

@@ -487,9 +487,11 @@ class EasyBreadcrumbBuilder implements BreadcrumbBuilderInterface {
if (isset($options['type']) && strpos($options['type'], 'entity:') === 0) {
$entity = $route_match->getParameter($name);
if ($entity instanceof EntityInterface && $entity->hasLinkTemplate('canonical')) {
$title = $entity->label();
$title = $this->normalizeText($this->getTitleString($route_request, $route_match, $replacedTitles));
// Add this entity's cacheability metadata.
$breadcrumb->addCacheableDependency($entity);
// If the title is to be replaced replaces the title.
if (!empty($title) && array_key_exists((string) $title, $replacedTitles)) {
if (!empty($title) && array_key_exists($title, $replacedTitles)) {
$title = $replacedTitles[(string) $title];
}
if ($title && $this->config->get(EasyBreadcrumbConstants::TRUNCATOR_MODE)) {
Loading