where it Is made Breadcrumb Array in Magento 2.3.1?

In Detail page has show Breadcrumb but i m not able to find where it Is made Breadcrumb Array

enter image description here

Can somebody help me?


3 Answers 3


For product page breadcrumbs loading from


function _resolveCategoryUrl

Basically the code is checking if category path included in url then its creating breadcrumbs path from url, otherwise it will check for referral url and if referral is category url then it will find category title and url from menu dropdown

See function _resolveCategoryCrumbs

So if category is not included in menu then it won't show breadcrumbs!


for product page, https://github.com/magento/magento2/blob/2.3-develop/app/code/Magento/Catalog/view/frontend/templates/product/breadcrumbs.phtml

it is calling below js file https://github.com/magento/magento2/blob/2.3-develop/app/code/Magento/Catalog/view/frontend/web/js/product/breadcrumbs.js

and it is creating json from below file https://github.com/magento/magento2/blob/2.3-develop/app/code/Magento/Catalog/ViewModel/Product/Breadcrumbs.php#L104

hope it will clear your doubts.

  • i know that but how to made Array and where? Commented May 14, 2019 at 8:28
  • updated answer @SavanPatel Commented May 14, 2019 at 8:41
  • i know all three file you said me but how it work to create a array? Commented May 14, 2019 at 8:47
  • it is passing json into js file and js file do process, you just need to debug that js file Commented May 14, 2019 at 8:52

There are quite a few places. Breadcrumbs are used almost identical as they were in Magento 1.

The module responsible with them is: Magento_Theme. They are added to the layout in:






Now, each module that renders pages, can modify/add what breadcrumbs they want.

As I can see, you are interested in product page. That is rendered "_prepareLayout()" from:


If you want to find them all, just search all the magento vendor module for:


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.