How to add hierarchical taxonomy terms in breadcrumb?

Answer: There are many ways to solve the same problem in Path Breadcrumbs.

  1. Use "parent" tokens (for example %node:field-category:parent:parent:parent:i18n-name) as many times as many deep levels you want.
    Read more here.
  2. Use magic token "pb-join" to automatically add all taxonomy hierarchy to breadcrumbs (for example %node:field-category:pb-join:name and %node:field-category:pb-join:url).
    Read more here.
  3. If your taxonomy listing is a view, try to use Views path view/%taxonomy and “Taxonomy term:ID” for the argument. Under “Selection rules” choose the taxonomy you want.

Why Path Breadcrumbs for path content/testalias doesn't work?

Answer: Path Breadcrumbs works only with system Drupal paths. Not aliases.
Most common paths: node/7 for node 7, taxonomy/term/%term for any taxonomy term.

How can I know if it is system path or alias?

Answer: You can find out system path with Devel module's “Menu item” functionality. Just go on page:

devel/menu/item?path=any-path

where any-path is path or alias for which you want to know system path.

Answer:

  1. Use the same system path node/% (for example node/%product for product content type (PB1) and node/%node for all other nodes (PB2)).

    Note: Context name (%product, %node, %whatever) doesn't matter and can be anything you want.

  2. Add selection rule to Path Breadcrumb for path node/%product (PB1):
    “Node: Bundle” is bundle “Product”.
  3. Reorder Path Breadcrumbs on page admin/structure/path-breadcrumbs to set up PB1 before PB2.

Answer: Use i18n_variable module from i18n package. More info with screenshots.

How can I know which Path Breadcrumbs item is shown on page?

Answer: Disable Path Breadcrumbs cache and use Contextual links to go to current Path Breadcrumbs item.
If you don't see “Edit path breadcrumbs” link in Contextual menu near breadcrumbs area, it means that Path Breadcrumbs doesn't work on this page.
Read more here.

Answer: Use magic token "pb-join" to automatically add all menu item parents in your breadcrumbs.

  • For nodes: %node:menu-link:pb-join:name / %node:menu-link:pb-join:url
  • For current page menu item: %site:current-page:menu-link:pb-join:name / %site:current-page:menu-link:pb-join:url
  • For Book trail (Token module required): %node:book:pb-join:name / %node:book:pb-join:url

Note: "menu-link" token is provided by Token module.

How to add menu trail based on path?

For example, you have path "path/with/your/breadcrumb" . If you want to add menu links from each subpath of the current path ("path", "path/with", "path/with/your", "path/with/your/breadcrumb") to breadcrumb, then consider using token %site:current-page:path-menu-trail:pb-join:name (for URLs use %site:current-page:path-menu-trail:pb-join:url token).

Path Breadcrumbs module doesn't work for my theme.

Answer: Some themes conflict with Path Breadcrumbs' option “Use module breadcrumbs render function”. You can disable it or check existing theme related issues:

Comments

knalstaaf’s picture

taxonomy/term/%tid as a the system path could do the job as well in case %term isn't working out.

perarg’s picture

I think devel/menu/item?path is not working anymore :)

ykoech’s picture

I wish this had JSON-LD Support considering Google doesn't support existing rich snippets 😔