Currently Custom Breadcrumbs will take the terms from the vocabulary with the lightest weight that is associated with a node and then will use that to build the breadcrumb trail.

This means that you can only use a single vocabulary to build the breadcrumb trail.

In my case I would like to build my breadcrumb trail with multiple vocabularies. It would be handy to be able to do something like the following, where the number represents the vocabularyID.

[2:termpath]
[1:termpath]
[5:termpath]
etc.

The site I'm building has the following two vocabularies.

VOCABULARY 1
Product Line A
Product Line B

In parenthesis is the product line that each product belongs to, A, B, or Both.

VOCABULARY 2
Amplifiers
- Mini Amplifiers
-- Full Range (A)
-- Mono Block (Both)
- A Class Amplifiers (Both)
- B Class Amplifiers (B)
- C Class Amplifiers (Both)
Subwoofers
Accessories
etc

I couldn't figure out how to combine the two vocabularies (with product line at the top level) using the multiple hierarchy capabilities of taxonomy. Amplifier would have Product Line A & B as parents. "Full Range" is part of Product Line A but it appears in both because it has Amplifiers as a parent which has both Product Lines as parents. Whew, did I say that right?

Creating multiple terms (ex. Amplifier as two separate termIDs) is the only way I see to combine the two vocabularies because I'm "skipping" a level when selecting multiple parents. Anyway, that's why I'm separating the vocabularies and would like to build my breadcrumb trail from two different vocabularies.

Thanks!
-Tim

Comments

MGN’s picture

Version: 6.x-1.5 » 6.x-2.x-dev
Category: feature » support
Status: Active » Postponed (maintainer needs more info)

Are you using 6.x-1.5 or 6.x-2.x ? custom breadcrumbs_taxonomy is only a component of 6.x-2.x...

Custom breadcrumbs doesn't create its own tokens, so if you can't find the token you would like to use, you might need to write your own.

Have you tried the patch in comment #22 of #185446: Provide tokens for each vocabulary. It doesn't look like it will be committed to token, but seems like it might suit your needs.

TimG1’s picture

I was using 6.x-1.5. I tried upgrading to 6.x-2.0-beta2 and using the _taxonomy component. However, it doesn't seem to be working or maybe I'm just not using it correctly.

Tokens for each Vocab would solve my problem I think. Thanks for pointing that out!

-Tim

Anonymous’s picture

Any news about the matter?

I also have the problem of showing multiple taxonomy breadcrumbs using 6.x-2.0.

My nodes can belong to multiple terms in more than one vocabulary, so that what I would need is

[vocabulary 1] >> term1 >> subterm1
[vocabulary 1] >> term1 >> subterm2
[vocabulary 1] >> term2
[vocabulary 2] >> term3

Can this be achived? Thank you very much

Leonardo Giordani

MGN’s picture

Status: Postponed (maintainer needs more info) » Fixed

@lgiordani - I assume you are also trying to select one vocabulary out of several? If you create the tokens [vocabulary 1] and [vocabulary 2] then custom breadcrumbs could use those tokens to do what you are looking for. But these are not standard tokens of the token module. See my comments in #1 for more details.

I am marking this as fixed because the question has been answered. Reopen if you have further questions on this issue.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

mr.j’s picture

I have the module from #22 at #185446: Provide tokens for each vocabulary. At first it does not work but can be made to work:

1. Due to a bug it only provides aliases suitable for use in pathauto, not titles. eg 'vocab-term' vs 'Vocab Term'. The token for the name of the term is being cleaned and spaces replaced with hyphens when it should not be. This is no good for use as a breadcrumb title.

So remove the call to _token_vocab_clean_name() on line 45 here:

$values['vocab-'.$name.'-term'] = check_plain(_token_vocab_clean_name($result['name']));

i.e.

$values['vocab-'.$name.'-term'] = check_plain($result['name']);

2. I found that even though it was working the breadcrumb kept being overridden by the taxonomy generated breadcrumb after it was set. So you need to exclude the node type from taxonomy-based breadcrumbs on the settings page.