Close

Customize views

domenico.neri
10 years ago
#3593 Quote
Avatar
  • 13
Hi, how can I customize megamenu.cshtml view or create a custom theme? I'm trying to change it but without success.
Support
10 years ago
#3596 Quote
Avatar
  • Moderator
  • 1044
Hi DOMENICO.NERI,

You need to edit the Plugins/SevenSpikes.Nop.Plugins.MegaMenu/Views/MegaMenu/MegaMenu.cshtml view. After that you can restart the application from the administration to see the changes.

As all of our plugins are themable if you have your own theme, say named "My_Theme_Name" you can override the default views of the Mega Menu by creating a folder in the Themes folder as shown below:

Copy the Plugins/SevenSpikes.Nop.Plugins.MegaMenu/Views/MegaMenu/MegaMenu.cshtml file to
Plugins/SevenSpikes.Nop.Plugins.MegaMenu/Themes/My_Theme_Name/Views/MegaMenu/MegaMenu.cshtml. Thus when in the future you upgrade your nopCommerce to newer version you will have your own changes separated from the plugin and easily can be merged in the new version.

Please also make sure that you have copied the web.config file from Themes/DefaultClean/Views/ to the Themes/My_Theme_Name/Views folder as it is needed by the MVC.

Hope that helps!