Close

Change placement of the mega menu

hkreklame
10 years ago
#6303 Quote
Avatar
  • 34
Is there a way to differ the placement of the mega menu? I would like it to appear inside a different div.
Deni
10 years ago
#6313 Quote
Avatar
  • Moderator
  • 389
hkreklame wrote:
Is there a way to differ the placement of the mega menu? I would like it to appear inside a different div.


The MegaMenu is placed in the widget zone specified in this file: ~\Plugins\SevenSpikes.Nop.Plugins.MegaMenu\SupportedWidgetZones.xml. You can change this widget zone:

<WidgetZone>content_before</WidgetZone>


to whatever you want.

For example you can add a new widget zone to your code and set the MegaMenu to use it.
Or you can just find where this widget zone is called and wrap it in a element by your choice.


If you use our theme, then you can just go to _Root.cshtml file and you will find logic like this:


        @{
            var menu = @Html.Widget("theme_header_menu");
        }

            <div class="header-menu">
                @if (MvcHtmlString.IsNullOrEmpty(menu))
                {
                    @Html.Action("TopMenu", "Catalog")
                }
                else
                {
                    @menu
                }
            </div>


Now you can take all this logic and move it wherever you want.

Hope that helped you!

Best Regards !
Best Regards,
Mladen Staykov
Nop-Templates.com
hkreklame
10 years ago
#7391 Quote
Avatar
  • 34
Thank you! :)