Some sites have a link in the main menu pointing to the home page. This patch implements hook_menu_breadcrumb_alter() to remove the leading "Home" link in that case (with a new admin setting in case you don't want to activate it).

Comments

Previous patch will fail because there is an error in the diff header. Here's the corrected version. Content is exact same.

mesr01,

In your code below

if (variable_get('menu_breadcrumb_single_home_link', FALSE)
      && isset($active_trail[0]) && isset($active_trail[1])
      && $active_trail[0]['href'] === '<front>' && $active_trail[1]['href'] === '<front>')

We can modify this patch and come up with a new functionality.
If a user wants to remove the home link/text from the breadcrumb, then via this they can remove it completely, even if the link does not exists in the main menu. (More flexibility)

if (variable_get('menu_breadcrumb_single_home_link', FALSE)
      && isset($active_trail[0]) && $active_trail[0]['href'] === '<front>')

Comments and suggestions welcomed.

Rather than special casing for <front>, why don't we (optionally, or per default) reduce duplicates once we've generated the breadcrumb? That would seem more sensible. I imagine lots of sites already have Home > ViewA > ViewA+Filter > Node structures, this might be beneficial for that case too.

grobot,

Yes we can, we can provide an admin option to remove any possible duplicates.
Apart from that I am thinking about adding an option to remove the "HOME" link from the menu.

I have added the option to remove the Home / link to front page.
It is in dev mode, if required, please test it and let me know if you face any issues.
I will then work on adding a check for removing duplicate enteries from the Breadcrumb.

Assigned:mesr01» vaibhavjain
Category:Bug report» Feature request
Issue summary:View changes
Status:Needs review» Needs work