Score:0

Change breadcrumb title based on a node field?

in flag

I am using the Menu Breadcrumb module to automatically generate a breadcrumb based on the menu placement of the currently viewed node. I want to change some of the titles in the breadcrumb chain based on a field on the node. If it exists and is not empty, the breadcrumb should use that instead of the node title.

Whats the most effective way to do this without extending Menu Breadcrumb to make a small edit? hook_system_breadcrumb_alter seems to be very late in the process. I also don't want to have any negative performance impact. Should I really override the _title_callback for Nodes? Would that impact anything?

Setting the menu title on the node is one way to do this, but there will be cases where nodes won't be in a menu at all (think Events or Articles, which may be navigated by home > section > section > views page > (node item) without anything in the menu). I want to support both scenarios.

No Sssweat avatar
ua flag
You could do it with Javascript/jQuery, just throwing this out there.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.