How can I get the breadcrumb array from my template?
I'm able to get the object:
$this->getLayout()->getBlock('breadcrumbs');
and full breadcrumb path as final HTML
$this->getLayout()->getBlock('breadcrumbs')->toHtml;
But when I use getData or toJson it returns the object, not the breadcrumb data.
$this->getLayout()->getBlock('breadcrumbs')->getData;
Returns
array(2) { ["type"]=> string(36)
"Magento\Theme\Block\Html\Breadcrumbs" ["module_name"]=> string(13)
"Magento_Theme" }
$this->getLayout()->getBlock('breadcrumbs')->toJson;
Returns
string(81)
"{"type":"Magento\\Theme\\Block\\Html\\Breadcrumbs","module_name":"Magento_Theme"}"