I am wondering how to add programmatically a new link (to main top menu in header) with submenu (custom content visible on hover – styles is not a problem).
How to achieve that, via xml or via (php) plugin?
More descriptive image below:
magento2navigationtoplinkstopmenu
Best Answer
You can add elements to the top menu using the event page_block_html_topmenu_gethtml_before.