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.

Command icon 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

sp3boy created an issue. See original summary.

sp3boy’s picture

I 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.

Greg Boggs made their first commit to this issue’s fork.

  • Greg Boggs committed d6fd5428 on 2.x authored by sp3boy
    Issue #3346957 by sp3boy: Provide system_breadcrumb_alter for structured...
greg boggs’s picture

Thanks 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.

spuky’s picture

Status: Active » Closed (outdated)

closing since the MR was merged and this was just not closed