Breadcrumbs with multiple links

Created on 17 October 2023, about 1 year ago
Updated 5 August 2024, 5 months ago

Hi Team, first of all thanks for great contribution into json:api and API First initiative. I come with support request.

Breadcrumbs

I'm trying to build breadcrumbs for json:api using the best way. To be short - my expectations was like I'd be able to add a couple of links based on something inside of the resource (content type -> node).

But at some point I realized that there only one link possible to return from my plugin into LinkCollection, unfortunately.

Kindly explain the supposed design of the breadcrumbs? As it's mentioned in the description of extension it could be developed. Probably I choose the wrong approach. Any advice appreciated.

Kind of expected results might looks like this:
for the top_level_object = true

"links": {
        "breadcrumbs": [
        {
            "title": "Home",
            "href": "http://project.site/"
        },
         {
            "title": "Category 1",
            "href": "http://project.site/cat1"
        },
                 {
            "title": "Category 2",
            "href": "http://project.site/cat2"
        },
       ]
        "self": {
            "href": "http://..."
        }
    }

or considering another kind of annotation with link_context, it doesn't matter:

link_context={
    "resource_object" = "node--type_page",
   }

Thanks in advance.

πŸ’¬ Support request
Status

Active

Version

1.9

Component

Code

Created by

πŸ‡ΊπŸ‡¦Ukraine kir.lazur@gmail.com Kiev

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024