Hello and thanks for this theme,
Problem/Motivation
When I use this theme with Easy Breadcrumb module, the last item of the breadcrumb trail duplicates.
Steps to reproduce
- Install Mahi theme
- Install Easy Breadcrumb module
- Activate breadcrumb block
Proposed resolution
I've just commented out the code below, but there could better be a check for the user's settings and module installations too.
/* *
// * Add current page to breadcrumb.
// */
// function mahi_preprocess_breadcrumb(&$variables) {
// $request = \Drupal::request();
// $route_match = \Drupal::routeMatch();
// $page_title = \Drupal::service('title_resolver')->getTitle($request, $route_match->getRouteObject());
// if (!empty($page_title)) {
// $variables['breadcrumb'][] = [
// 'text' => $page_title,
// ];
// // Add cache context based on url.
// $variables['#cache']['contexts'][] = 'url';
// }
// }
Best,
Orkut
| Comment | File | Size | Author |
|---|---|---|---|
| #3 | without_easy_breadcrumb.png | 155.04 KB | brahmjeet789 |
| #3 | When_using_easybreadcrumbs.png | 151.07 KB | brahmjeet789 |
| #2 | 3450062-breadcrumbs-duplicate-with1.patch | 1021 bytes | orkutmuratyilmaz |
Comments
Comment #2
orkutmuratyilmazI'm also adding my temporary fix as a patch here, in order to deal with my composer.json file.
Comment #3
brahmjeet789 commented@orkut murat yılmaz yes i can see the title appear twice when we are using easybreadcrumb with this theme ,but if we are not using any breadcrumb module because breadrumbs are already there in theme so i guess we dont require two breadcrumbs.
Comment #4
brahmjeet789 commentedComment #5
orkutmuratyilmaz