How to create breadcrumbs with sleekshop

Back 2023-09-21 22:32:21
The latest updates enable another very easy way of implementing breadcrumbs.

Since one of the updates last month, in some api - requests we can find a new block named "path" that looks like this: 

"path": {

"name": "cat1/cat2/cat3",

"nodes": [

{

"name": "cat1",

"prio": 2,

"id": 61,

"id_parent": 0,

"label": "label_de",

"seo": {

"permalink": "",

"title": "",

"description": "",

"keywords": ""

}

}

,

{

"name": "cat2",

"prio": 1,

"id": 62,

"id_parent": 61,

"label": "header",

"seo": {

"permalink": "lalala7",

"title": "lalalalal",

"description": "",

"keywords": ""

}

}

]

},

As you can see we have the name of the path. The last element of the path is cat3 and thats actually the category we are fetching. All needed information for the cat3 category are in the category section of the call which we already know. The nodes section which is new, contains the nodes before cat3 with all data, like permalink, name and things we can easily use to build breadcrumbs which are also linked.

So if we fetch products in cat3 and receive also all needed node informations leading to cat3 then we can build the breadcrumb link structure.

Try sleekshop 30 days for free.

Start now