Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
I have a field collection nested inside a node. That field collection has a field collection nested inside it. That field collections has other field collections nested inside it. When I go to one of the nested field collection entities (view or edit) I want a breadcrumb trail to show a path back up the chain to the node. Is there anything existing like that out there?
Comments
Comment #1
RobKoberg CreditAttribution: RobKoberg commentedHi again, Perhaps the following would be a useful function to add to the field_collection module (unless it already exists and I missed it?):
Or perhaps there is a better performing way to recurse up or get the ancestry chain?
Comment #2
jmuzz CreditAttribution: jmuzz commentedThe common approach would be to implement hook_menu_breadcrumb_alter.
I'm not sure I see the point of traversing the ancestor trail to put it in an array. In this case the array is going to be looped over to build the breadcrumbs and the breadcrumbs can be built while traversing the trail instead.
Comment #4
osopolarBreadcrumbs aren't working yet, instead there is a comment in field_collection_item_page_view():