Magento – Changing main navigation

magento2navigationoverrides

I would like to change the dropdown behaviour of navigation. Which files need to be changed?

I try to give the dropdown 100% width and place items inline

I see this file /vendor/magento/module-theme/view/frontend/templates/html/topmenu.phtml. How do I override this in a custom theme and how do I add .css and .js to it?

Best Answer

Firstly, you need to create your own theme and override which module you want to do. 1. you need to override module-theme in your theme: layout and template

/root/test/kingfisherflyshop-new/app/design/frontend/yournamespace/your module-name/Magento_Theme/layout/override/base/default.xml

app/design/frontend/yournamespace/your module-name/Magento_Theme/templates/html/topmenu.phtml

http://devdocs.magento.com/guides/v2.0/frontend-dev-guide/layouts/layout-override.html

Related Topic