piyushlathiya of Aureatelabs
1/3/2017 - 9:43 AM

Add Breadcrumbs to any non-included page #M2 From http://www.webmull.com/magento-2-add-new-custom-breadcrumb-in-checkout-page/

Add Breadcrumbs to any non-included page #M2 From http://www.webmull.com/magento-2-add-new-custom-breadcrumb-in-checkout-page/

<referenceBlock name="breadcrumbs">
  <action method="addCrumb">
    <argument name="crumbName" xsi:type="string">Home</argument>
    <argument name="crumbInfo" xsi:type="array">
      <item name="title" xsi:type="string">Home</item>
      <item name="label" xsi:type="string">Home</item>
      <item name="link" xsi:type="string">/</item>
    </argument>
  </action>
  <action method="addCrumb">
    <argument name="crumbName" xsi:type="string">Shopping Cart</argument>
    <argument name="crumbInfo" xsi:type="array">
      <item name="title" xsi:type="string">Shopping Cart</item>
      <item name="label" xsi:type="string">Shopping Cart</item>
      <item name="link" xsi:type="string">/checkout/cart</item>
    </argument>
  </action>
</referenceBlock>

In ptemplate file:
<?php echo $this->getLayout()->getBlock('breadcrumbs')->toHtml(); ?>