2

I am trying to add custom file in left navigation before the filters.

<referenceContainer name="sidebar.additional">
        <block class="Magento\Framework\View\Element\Template" name="seotext_sidebar" template="Magento_Catalog::product/seotext.phtml" before="-">
        </block>
    </referenceContainer>

the above code appears after the filters but not before the filters.

how can i load custom file before the filters. I need to move breadcrumbs to left navigation.

2

Change

before="-"

to

before="catalog.leftnav"

See what happen.

As before="-" is count as the first level of this section, and you want
change block position to before it then you have put catalog.leftnav in before tag

| improve this answer | |
  • @jafarpinjar Then you should mark as accepted which will help future readers :) – Aditya Shah Sep 26 '18 at 12:16
  • @AdityaShah, how to move this outside the content, like before the footer – jafar pinjar Jan 9 '19 at 9:35
0

you can add like this also in your layout default.xml or else in your theme catalog_category_view_type_layered.xml file

<referenceContainer name="sidebar.main">
    <referenceBlock  name="catalog.leftnav" >
          <block class="Magento\Framework\View\Element\Template" name="seotext_sidebar" 
                  template="Magento_Catalog::product/seotext.phtml" before="-">
          </block>
    </referenceBlock>
</referenceContainer>
| improve this answer | |

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.