| Project: | Custom Breadcrumbs |
| Version: | 6.x-2.0-rc1 |
| Component: | Code |
| Category: | feature request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | needs review |
Issue Summary
<menu-parent-trail> is useful but it doesn't include the actual path, and there are places that might be needed.
For instance I have a view, which is a sub menu of a primary link, and that view list nodes of a specific content types.
When viewing a node I want to make both the view and the full menu parent trail the bradcrumbs.
I know I can do this manually by using and then manually typing the actual view, but I rather use the data from the menu, in case I ever change it.
Attached are two new identifiers which uses the same approach as menu-parent-trail but works for a specific menu item.
I also did it so you can use it by path or by menu id. Menu ID is important as one path can be on several menus. I first thought of doing an if (is_numeric()) inside one single identifier, but there's no limitations to making an actual drupal path a number, so I rather do it like this.
To be honest, I had problems with menu-parent-trail with paths on different menus, so I think this approach has to be extended to that one. I don't mind rolling a patch to that as well. Will comment about this on the original issue.
Comments
#1
#2
cleaned code and do not allow default for -by-id
#3
one more tiny clean