2

I need to remove the ttl attribute value from catalog.topnav block in default.xml file. I have overrided the file in custom path as follows:

Magento_Theme/layout/default.xml

<referenceBlock name="catalog.topnav">
   <attribute name="ttl" value="" />
</referenceBlock>

Original block is as follows:

 <block class="Magento\Theme\Block\Html\Topmenu" name="catalog.topnav" template="Magento_Theme::html/topmenu.phtml" ttl="3600" before="-">
0

I have overrided the file in custom path as follows:

Magento_Theme/layout/default.xml

<referenceBlock name="catalog.topnav" remove="true"/>
<referenceBlock name="store.menu">
    <block class="Magento\Theme\Block\Html\Topmenu" name="catalog.topnav.without.ttl" template="Magento_Theme::html/topmenu.phtml" before="-"/>
</referenceBlock>

and override also the

Magento_Theme/layout/print.xml

<referenceBlock name="catalog.topnav.without.ttl" remove="true"/>

maybe it works for you too.

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.