2

I used this blog for add custom collection on my custom page with layered navigation. But, there are not display breadcrumbs and page title using this below blog.

How to add it?

enter image description here

https://webkul.com/blog/how-to-create-layered-navigation-on-custom-page-in-magento-2/

Please help me.

Thanks.

  • @HiteshAgrawal It's also not display swatch in configurable product. – Daniel Philip May 2 at 15:11
  • @AmitBera Can you please help me? – Daniel Philip May 7 at 5:47
  • @HiteshAgrawal any update for help? – Daniel Philip May 7 at 5:48
1

You can add below code in you xml or

<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" translate="true">Home</item>
                <item name="label" xsi:type="string" translate="true">Home</item>
                <item name="link" xsi:type="string">/</item>
            </argument>
        </action>
        <action method="addCrumb">
            <argument name="crumbName" xsi:type="string">myaccount</argument>
            <argument name="crumbInfo" xsi:type="array">
                <item name="title" xsi:type="string" translate="true">Your Custom Page</item>
                <item name="label" xsi:type="string" translate="true">Your Custom Page</item>
                <item name="last" xsi:type="boolean">true</item>
            </argument>
        </action>
    </referenceBlock>

If you have created cms PAge then u can add it in "Layout Update XML" field or u can use below settings for enable breadcrumb in ur cms page set it as yes.

enter image description here

| improve this answer | |
  • Thanks for you quick answer. But, It should be display dynamic. – Daniel Philip May 2 at 9:12
  • I have updated my answer plz check if it works for u. – Hitesh Agrawal May 2 at 9:13
  • It's custom page. – Daniel Philip May 2 at 9:13
  • Do you know any other way to display custom product collection with applied filter? same as like category page with layered navigation. – Daniel Philip May 2 at 9:13
  • Do you want with applied filter or with layered navigation ? – Hitesh Agrawal May 2 at 9:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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