DrupalCon Baltimore: 161 sessions, many voices, infinite possibilities. Earlybird rate ends Friday.
A note for D6 users: Everything quite similar, but some criteria have different names.
What you intend
You want breadcrumbs based on menu and taxonomy.
However, you want only specific menus and taxonomy vocabulary to be considered, and you want to give different priority to each.
The Crumbs configuration form at admin/structure/crumbs allows to prioritize the criteria that are used to find a breadcrumb parent for a specific path.
For menu and taxonomy, you will find criteria like this:
- If you work with taxonomy, then you have probably created a "term reference" field, to associate content with taxonomy terms. The given criterion targets nodes of type "faq_item", and uses the term reference "field_faq_category" to find a parent breadcrumb item.
- If a taxonomy term from the faq_categories vocabulary has a parent term, this parent term will be considered as the breadcrumb parent.
- If a page (just any page) is linked in the main menu, and this menu link has a parent item, then the parent item will be considered as the breadcrumb parent.
- The top-level wildcard criterion. This will be used as a "fallback" to determine the priority and enabled status for other criteria.
- A more specific wildcard criterion. Used as a fallback to determine the priority and enabled status for other menu-based criteria. For these, it does override the more generic '*' wildcard criterion.
For the given use case, you might want to move the criteria around (cut+paste) like this:
taxonomy.termReference.field_faq_category.node.faq_item - faq_item taxonomy.termParent.faq_categories - Vocabulary: FAQ categories menu.hierarchy.main-menu - Main menu menu.hierarchy.menu-footer-menu - footer menu * taxonomy.termReference.field_page_category.node.page - Basic page ---- disabled ---- menu.* taxonomy.termParent.* ---- disabled by default ---- taxonomy.termReference.* ---- inherit ---- [...]
Enabled vs disabled
Only selected criteria from menu and taxonomy are in the "enabled" section. The rest is either already disabled by default, or explicitly disabled using the generic wildcards of menu.* and taxonomy.termParent.*.
In case of taxonomy, we restrict the effect to only the faq_item node type. Other node types will not get a breadcrumb based on taxonomy.
The order of criteria in the "enabled" section defines their priority.
If a FAQ item belongs into a FAQ category and is linked in the main menu, then the FAQ category should have priority.
On the other hand, for the page node type, the "page category" term reference should only be used as a fallback, and have lower priority than any other criterion. So, if a page is tagged with a "page category" and linked in the main menu, then the breadcrumb parent will be chosen based on the menu.
What about the "inherit" section?
That section is automatically filled with anything that is not in one of the other sections.
For each of these criteria, Crumbs will use the weight and enabled status of the "next matching wildcard criterion".
taxonomy.* -> fallback to *, which is "enabled", and priority between footer menu and page category.
taxonomy.termParent.page_categories -> fallback to taxonomy.termParent.*, which is "disabled by default".
menu.link_title.navigation.* -> fallback to menu.*, which is "disabled".
Criteria that fall back to something enabled will be treated as if they were in the "enabled" section, right next to the respective wildcard criterion.