0

I want to override layered navigation template in my module(layer/view.phtml).

I created catalog_category_view_type_layered.xml file in Companyname/Modulename/view/frontend/layout/

catalog_category_view_type_layered.xml

<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
    <body>
        <referenceBlock name="catalog.leftnav">
            <action method="setTemplate">
                <argument name="template" xsi:type="string">Companyname_Modulename::view.phtml</argument>
            </action>
        </referenceBlock>
        <referenceBlock name="category.products">
            <action method="setTemplate">
                <argument name="template" xsi:type="string">Companyname_Modulename::products.phtml</argument>
            </action>
        </referenceBlock>
    </body>
</page>

Above file works proper in community edition but not working in enterprise edition.

2
  • I think there is a problem with set template, move your phtml into "layer/view.phtml". Commented Jun 26, 2018 at 9:01
  • If your file is already there then set "<argument name="template" xsi:type="string">Companyname_Modulename::layer/view.phtml</argument>" Commented Jun 26, 2018 at 9:01

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.