cancel
Showing results for 
Search instead for 
Did you mean: 

Override LayeredNavigation Block

   Did you know you can see the translated content as per your choice?

Translation is in progress. Please check again after few minutes.

Override LayeredNavigation Block

Trying to overrgide the LayeredNavigation blocks with the below code on di.xml

 

 

<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/internal/Magento/Framework/ObjectManager/etc/config.xsd">
    <preference for="Magento\LayeredNavigation\Block\Navigation" type="Vendor\Module\Block\Navigation" />
    <preference for="Magento\LayeredNavigation\Block\Navigation\State" type="Vendor\Module\Block\Navigation\State" />
    <preference for="Magento\LayeredNavigation\Block\Navigation\FilterRenderer" type="Vendor\Module\Block\Navigation\FilterRenderer" />
</config>

We were able to override the methods inside State but not from Navigation or from FileRenderer. Any thoughts on this.