2

I'm attempting to disable the navigation drop down menu on a store. Using the maximal depth setting in the stores configuration works however its a global setting which effects stores I would like to keep the menu active on. I also thought changing the expanded variable under topmenu.phtml to false would disable the feature but that has not worked either. Any help is appreciated.

3 Answers 3

0

The MauroNigrele solution hides the nav menu but leaves the nav-sections. To completely remove the nav use this code:

<referenceBlock name="navigation.sections" remove="true"/>
0

Please this code in your default.xml file.

<referenceBlock name="navigation.sections" remove="true"/>
-1

You can remove it by layout

  • Create a Custom theme for that/those store(S)
  • Remove the navigation from the layout:

app/design/frontend/{Vendor}/{theme}/Magento_Theme/layout/default.xml

<?xml version="1.0"?>
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
    <body>

        ...
        <referenceContainer name="page.top">
            <referenceBlock name="catalog.topnav" remove="true" />
        </referenceContainer>
        ...

    </body>
</page>
6
  • @Rakesh you made an unnecessary edit Magento_Theme is the folder name you actual need to use Commented Feb 10, 2016 at 11:21
  • Thanks, but I just need to remove the drop down portion of the menu. Commented Feb 10, 2016 at 16:31
  • Do you want to show only the guest level categoríes? Commented Feb 10, 2016 at 17:21
  • If by guest, you mean the parent categories that are visible without hovering, then yes. Commented Feb 10, 2016 at 20:26
  • Ahahaha I meant 'first level' (autocomplete error) Commented Feb 10, 2016 at 20:31

Your Answer

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

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