dynamic breadcrumb for views based on menu tree
drupalhooked - June 8, 2009 - 12:11
| Project: | Custom Breadcrumbs |
| Version: | 6.x-2.x-dev |
| Component: | Code |
| Category: | feature request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed |
Description
I 've my menu structure like this.
Item1
item1.1
item1.2
item1.2.1
item1.2.2
item2
item2.1
item2.2
when i click on item1.2.1 which is linked to a node view page. Using menu_breadcrumb module I have my breadcrumb like this Home>>item1>>item1.2>>item1.2.1 . it fine.
again I ve a menu item 1.2.2 which linked to some view page, my breadcrumb becomes Home>>item1.2.2 instead of Home>>item1>>item1.2>>item1.2.2.
I used custom_breadcrumb module for that, which works fine but I have put all breadcrumb item manually.
Is there any we to create the breadcrumb for views dynamically like its happening in case of node using menu_breadcrumb.
Thanks

#1
Item1
....item1.1
....item1.2
......item1.2.1
......item1.2.2
item2
....item2.1
....item2.2
#2
So if I understand correctly, you want the breadcrumb structure to match the menu structure when on a views page.
And rather than typing this in manually, you would like an option to match the menu structure automatically (i.e. dynamically)?
I haven't looked too deeply into this yet, but I am pretty sure this is a reasonable feature request, since we are already handling breadcrumbs for views, and the menu api already provides all the code we would need to set the breadcrumb trail correctly.
#424464: CB for Views: let views create customizable breadcrumbs might be related. You might want to try out that patch and see if it will do what you are looking for.
#3
If implemented, this would go to 6.x-2.x-dev.
#4
This patch adds an option to use the menu structure for the default breadcrumb trail (on the Site configuration >> custom breadcrumbs settings page). If that option is checked then hook_init is used to set the breadcrumb trail for all page types, including views pages. If a custom breadcrumb is defined for a page, then that breadcrumb will be used instead of the default.
I've done some limited testing and it seems to work on views in menu structures like that described in #1.
Some of the code is directly from the menu_breadcrumb module, just implemented within the custom_breadcrumbs structure, so don't run both modules at the same time.
Let me know if this works for you.
#5
This patch adds an option to use the menu structure for the default breadcrumb trail (on the Site configuration >> custom breadcrumbs settings page). If that option is checked then hook_init is used to set the breadcrumb trail for all page types, including views pages. If a custom breadcrumb is defined for a page, then that breadcrumb will be used instead of the default.
I've done some limited testing and it seems to work on views in menu structures like that described in #1.
Some of the code is directly from the menu_breadcrumb module, just implemented within the custom_breadcrumbs structure, so don't run both modules at the same time.
Let me know if this works for you.
#6
This patch adds an option to use the menu structure for the default breadcrumb trail (on the Site configuration >> custom breadcrumbs settings page). If that option is checked then hook_init is used to set the breadcrumb trail for all page types, including views pages. If a custom breadcrumb is defined for a page, then that breadcrumb will be used instead of the default.
I've done some limited testing and it seems to work on views in menu structures like that described in #1.
Some of the code is directly from the menu_breadcrumb module, just implemented within the custom_breadcrumbs structure, so don't run both modules at the same time.
Let me know if this works for you.
#7
This patch adds an option to use the menu structure for the default breadcrumb trail (on the Site configuration >> custom breadcrumbs settings page). If that option is checked then hook_init is used to set the breadcrumb trail for all page types, including views pages. If a custom breadcrumb is defined for a page, then that breadcrumb will be used instead of the default.
I've done some limited testing and it seems to work on views in menu structures like that described in #1.
Some of the code is directly from the menu_breadcrumb module, just implemented within the custom_breadcrumbs structure, so don't run both modules at the same time.
Let me know if this works for you.
#8
#9
#10
Thanks. I';ve tested this patch on a couple of sites over the last week and it seems to be working fine. I've committed this to 6.x-2.x-dev for further testing. If there are problems, please open a new issue.
#11
Automatically closed -- issue fixed for 2 weeks with no activity.