Close

Reposition Mega Menu in view?

PhokasWeb
7 years ago
#13242 Quote
Avatar
  • 4
Hello,

I would like to pull the mega menu out of the
<div class="master-wrapper-content"></div>


And put it above that to achieve a full width mega menu. Where can I do this?
anton_ivanov
7 years ago
#13250 Quote
Avatar
  • Moderator
  • 277
Hello,

You cannot do that from the administration. You will need to do some code customizations.

You can create a new widget zone where your Mega Menu will be displayed. Or you can move either the "content_before" or the "theme_header_menu" depending on whether you are using default clean or one of our themes.

Firstly, you will need to create a new widget zone for the Mega Menu. You will have to edit the ~/Plugins/SevenSpikes.Nop.Plugins.MegaMenu/SupportedWidgetZones.xml file and add a new line. The new line should be the name of the widget zone you want to create. Lets say you name it "new-widget-zone".

After that you will need to put the following line of code wherever you want your Mega Menu to be displayed:

        @Html.Widget("new-widget-zone")

You will also need to edit your menu at Administration -> Nop-Templates -> Plugins -> Mega Menu -> Manage Menus -> Edit your Menu and change the widget zone to your newly created one. Note that you will have to restart your store before you do that, otherwise you will not be able to see your new widget zone in the widget zone dropdown selector in the administration of the Mega Menu plugin.



Alternativly you can move your "content_before" widget zone. It is located in ~/Views/Shared/_Root.cshtml file on line 19 :

        @Html.Widget("content_before")


You can move it to wherever you desire.

Note: This method is not recommended  because moving the content_before widget zone will move all your other widgets displaying in that zone.

Hope that helps!

Regards,
Anton Ivanov
Nop-Templates.com