On my current project I was asked to customise the Easy Breadcrumb output for a certain content type. The customer wanted the breadcrumbs to include taxonomy terms associated with the node but did not want those terms in the path alias. I was able to write a hook_system_breadcrumb_alter function to achieve this for the visible breadcrumb block. However I then found that the output of structured data for schema.org was not reflecting the alteration. I made a change to EasyBreadcrumbStructuredDataJsonLd.php to execute the hook which appears to make that possible.
Issue fork easy_breadcrumb-3346957
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #3
sp3boy commentedI think this change is fairly straightforward and will be useful to other users of Easy Breadcrumb. This is the first contribution I've made to the Drupal 9 world so I hope I've got it right.
Comment #6
greg boggsThanks for the fix to the alter hook!
I think there's a setting to include taxonomy in the crumbs, but it's probably not configurable enough for your use case because it doesn't let you choose a field to use and content types to apply it to.
Comment #7
spuky commentedclosing since the MR was merged and this was just not closed