In those cases, use the below solution to show the mega menu in Magento 2 store.
I would be happy to help.
The mega menu navigation can disappear in some cases. One of the issues is when you activate the varnish cache in your Magento 2 store; the mega menu may disappear.
If you have any doubts regarding this post, just mention them in the Comments section below.
Solution for Navigation / Mega Menu is Missing When Varnish Cache is Activated in Magento 2:
<block class=“MagentoFrameworkViewElementTemplate” name=“store.menu” group=“navigation-sections” template=“Magento_Theme::html/container.phtml”>
<argument name=“title” translate=“true” xsi:type=“string”>Menu</argument>
<block class=“MagentoThemeBlockHtmlTopmenu” name=“catalog.topnav” template=“Magento_Theme::html/topmenu.phtml” ttl=“3600” before=“-“/>
Thank you for subscribing.
Something went wrong.
Remove the TTL attribute (ttl=”3600″) from default.xml file located at vendor/magento/module-theme/view/frontend/layout.
Megamenu is a drop-down menu with multi-level expansions that lets you display your website’s full navigation into a single menu. A mega menu allows visitors to reach even the deepest sections of a website through the main menu.
Feel free to share the solution with Magento Community via social media.
Megamenu is one of the most beneficial aspects to improve user experience as Jakob Nielsen explains, “By helping users find more, they’ll help you sell more.”
Get Weekly Updates
Now check in the frontend, Megamenu is now displaying in your store!
That’s easy, right?
Never miss Magento tips, tricks, tutorials, and news.