Taxonomy term breadcrumb service priority

Created on 11 January 2016, almost 9 years ago
Updated 6 September 2024, 3 months ago

Problem/Motivation

On my website I've custom module. In this module I've tried to add custom breadcrumbs for taxonomy term page. So I created custom class (that implements BreadcrumbBuilderInterface interface) and add it in services.yml file. After that I was confused because I was not be able to view my changes on taxonomy term page. The problem was in my breadcrumb service priority. I found, that default taxonomy_term.breadcrumb service has priority 1002, so you should use priority more then this number to override default breadcrumbs.

services:
  taxonomy_term.breadcrumb:
    class: Drupal\taxonomy\TermBreadcrumbBuilder
    arguments: ['@entity.manager']
    tags:
      - { name: breadcrumb_builder, priority: 1002 }

Can someone explain why exectly this number used as priority for default service?

Proposed resolution

Proposed resolution is to change this priority to number that has more meaning.

💬 Support request
Status

Closed: works as designed

Version

11.0 🔥

Component
Taxonomy 

Last updated 1 day ago

  • Maintained by
  • 🇺🇸United States @xjm
  • 🇬🇧United Kingdom @catch
Created by

🇺🇦Ukraine goodmood

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024