This is a follow-on from http://drupal.org/node/58034 - where it was discussed that the 'content' (or q=node) link should not appear by default in the breadcrumbs for node pages. Attached patch fixes this behaviour, by changing the 'node' menu item from a MENU_SUGGESTED_ITEM to a MENU_MODIFIABLE_BY_ADMIN item (the latter is the same as the former, except that it does not include the MENU_VISIBLE_IN_BREADCRUMB directive).
The problem, IMHO, is not that MENU_SUGGESTED_ITEM menu items should not appear in breadcrumbs - the patch that made such items appear in breadcrumbs needed to go in. The problem is that the 'node' menu item is a special case, and that it should not be a MENU_SUGGESTED_ITEM because of this.
Comment | File | Size | Author |
---|---|---|---|
node_page_menu_item.patch | 766 bytes | Jaza | |
Comments
Comment #1
Jaza CreditAttribution: Jaza commentedThe above patch currently works with HEAD and with the DRUPAL-4-7 branch, and should IMO be committed to both.
Comment #2
venkat-rk CreditAttribution: venkat-rk commentedOh, so it's a bit of a bug then. I was tearing my hair out yesterday wondering why on earth 'content' appeared in the breadcrumb on node view.
Comment #3
moshe weitzman CreditAttribution: moshe weitzman commentednice. finally someone who knows what they are talking about. tested and verified to fix the issue.
Comment #4
Zen CreditAttribution: Zen commented+1 But, please note that enabling the content menu item will pop the item in the breadcrumb anyways. So, if the expected behaviour of this patch is that "content" is never displayed in the breadcrumb (even when the *menu* item is enabled, it fails in that respect. On the other hand, this patch will revert the status of the "content" breadcrumb to how it was before #58034. Jaza, what do you think?
@Moshe: Please be civil. Such grandiose statements don't help anything or anybody.
Thanks
-K
Comment #5
Jaza CreditAttribution: Jaza commented@Zen: yes, I'm aware of the fact that the breadcrumb will appear if the user manually enables the 'content' menu item, and that this is how the 'content' menu item used to behave. I think it's important that users still have a choice: they can either have the 'content' link appear in their breadcrumbs, or they can have it not appear. All that this patch does, is it effectively swaps around the default option and the non-default option.
Thanks for the testing, guys. Looks like it's still RTBC. :-)
Comment #6
drummComitted to HEAD.
Comment #7
venkat-rk CreditAttribution: venkat-rk commentedThis patch doesn't seem have to made it to the 4.7 tarball I just downloaded. I still get the Home>>content links.
I notice that the fix is for HEAD. Does this mean it won't be applied to 4.7? If so, can someone suggest a way to solve this without applying the patch?
Comment #8
killes@www.drop.org CreditAttribution: killes@www.drop.org commentedThe patch was applied to the 4.7 branch as well and will be in 4.7.1.
Comment #9
venkat-rk CreditAttribution: venkat-rk commentedThanks for the clarification. I just realised from #5 that I have to disable content in the menu. Sorry for the bother.
Comment #10
(not verified) CreditAttribution: commented