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
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"/>
Please this code in your default.xml file.
<referenceBlock name="navigation.sections" remove="true"/>
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>
-
@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
-
-
If by guest, you mean the parent categories that are visible without hovering, then yes. Commented Feb 10, 2016 at 20:26
-