- Issue created by @matia.ward
- πΊπ¦Ukraine goodboy Kharkiv, Ukraine
@matia.ward, I decided to add breadcrumb into Decoupled Kit Block (2.0.3 version).
Please, seesystem_breadcrumb_block
block andsettings/breadcrumb
section in the resulted JSON. - πΊπΈUnited States matia.ward
Not sure if I'm doing something wrong, but it seems to give back the same breadcrumbs regardless of what the custom_path string is:
"settings": { "id": "system_breadcrumb_block", "label": "Breadcrumbs", "label_display": "0", "provider": "system", "breadcrumb": [ { "text": "Home", "url": "/" }, { "text": "Jsonapi", "url": "/jsonapi" } ] },
The breadcrumb output should change based on that variable, correct? Example URL string (whitelisted IPs only, so you won't be able to view the JSON): https://drupal.nidentistry.devsr.com/jsonapi/decoupled_kit/blocks?curren...
- πΊπ¦Ukraine goodboy Kharkiv, Ukraine
@matia.ward, ah, sorry, you are right. Core breadcrumb doesn't know how to construct breadcrumb correctly (it uses $this->context->getPathInfo() istead of $route_match data). Try to use Easy breadcrumb β or similar modules.
- πΊπ¦Ukraine goodboy Kharkiv, Ukraine
@matia.ward, I did commit to dev version, please check.
- Status changed to Needs review
about 13 hours ago 3:15pm 14 August 2025 - πΊπΈUnited States matia.ward
I updated a site to the 2.0 dev version and looked at the json response using this url: /jsonapi/decoupled_kit/blocks?current_path=/testimonials/single-post¤t_theme=gin. My response now includes the parent page! The indexing is off though, goes from 0 then 2:
"drupal_internal__id": "gin_breadcrumbs", "theme": "gin", "region": "breadcrumb", "weight": 0, "provider": null, "plugin": "system_breadcrumb_block", "settings": { "id": "system_breadcrumb_block", "label": "Breadcrumbs", "label_display": "0", "provider": "system", "breadcrumb": { "0": { "text": "Home", "url": "/" }, "2": { "text": "Testimonials", "url": "/testimonials" } } },
Tested with another nested child and got even more index weirdness, lol. This path was /testimonials/single-post/another-child.
"breadcrumb": { "0": { "text": "Home", "url": "/" }, "2": { "text": "Single Post", "url": "/testimonials/single-post" }, "3": { "text": "Testimonials", "url": "/testimonials" } }
I think just fixing up the indexing would do it! Thank you!
- ab0c5791 committed on 2.x
Issue #3527486: Version 2.0 and Breadcrumbs
- ab0c5791 committed on 2.x
- πΊπ¦Ukraine goodboy Kharkiv, Ukraine
@matia.ward, many thanks for your testing.
I've fixed that case, please test it on the dev version.
But the right way is to use contributed breadrumb modules like Easy breadcrumb β .