Close

cant get dropdown working in nop2.6

refurb.tech
11 years ago
#1012 Quote
Avatar
  • 10
hi there, i have installed the nop categories plugin, but so far cannot get the dropdown box to work and not sure why, instead of dropdown all i can get is the categories across the bottom beneath the header menu whereas i need the dropdown to come from the headermenu in a new categorie that i have created.

thanks for any help you can give me.
Support
11 years ago
#1015 Quote
Avatar
  • Moderator
  • 1044
Hi,

Have you activated the plugin as a widget. You can check this in Administration -> Content Management -> Widgets and for the Nop Categories Header Menu the IsActive value should be set to True. If it is no activate it.

Please let us know if you still experience this problem and if possible send us a link to  the site so that we can have a closer look at it.

Thanks!
refurb.tech
11 years ago
#1016 Quote
Avatar
  • 10
hi there i activated it as it should have been, i even called it manually, unfortunately the only menu i get is beneath the header menu, it does have my categories but as i mentioned before i need the drop down box, i think the template i am using is based on the nopclassic theme if that makes any difference, unfortunately i am running it local so cant give you a link unless i can forward a port but not sure if that would work using webmatrix, let me know if it is and i will try and do it ?

thankyou
Support
11 years ago
#1019 Quote
Avatar
  • Moderator
  • 1044
Hi,

If I understand correctly you want a single item in the menu for the categories called "Categories" for example and when you hover over all the categories should be visible in a dropdown.

If this is the case I will try to explain how the Nop Categories Header Menu works:

For every level of the menu corresponds and <ul> list with items. So if you want a single  box for the categories you may try something like this:

Open the ~\Plugins\SevenSpikes.Nop.Plugins.CategoriesHeaderMenu\Views\CategoriesHeaderMenu\CategoriesHeaderMenu.cshtml and edit the code as shown below:

<div class="categoriesHeaderMenu">
    <ul id="SuperFishMenuId" class="sf-menu">
        <li><a href="#">@T("Categories")</a>
            <ul>
                @Html.Raw(Model.CategoriesHtml)
            </ul>
        </li>
        @* You can add additional links if you like i.e link to About Us topic page
        <li><a href="@Url.RouteUrl("Topic", new { SystemName = "aboutus" })">@T("AboutUs")</a></li>
        *@
    </ul>
</div>

Hope that helps!
refurb.tech
11 years ago
#1027 Quote
Avatar
  • 10
hi and thanks for your reply, its really helped and the dropdown is now working, unfortunately i still cannot get it in the menu next to the home button, i have altered the css for height, width, color, margin, border etc but it just does not seem want to go where i want ?

hope you can help me again.

tnx

Support
11 years ago
#1031 Quote
Avatar
  • Moderator
  • 1044
Hi,

You will need to integrate it manually in that case. So disable it as a widget and make the call to the Categories Header menu in your Comnon/Menu.cshtml view right after the link for the Home page, i.e.

<ul class="topmenu">
    @Html.Action("WidgetsByZone", "Widget", new { widgetZone = "header_menu_before" })
    <li><a href="@Url.RouteUrl("HomePage")">@T("HomePage")</a></li>
    <li>@Html.Action("CategoriesHeaderMenu", "CategoriesHeaderMenu")</li>
    @if (Model.RecentlyAddedProductsEnabled)
    {
        <li><a href="@Url.RouteUrl("RecentlyAddedProducts")">@T("Products.NewProducts")</a>
        </li>
    }
    <li><a href="@Url.RouteUrl("ProductSearch")">@T("Search")</a> </li>
    <li><a href="@Url.RouteUrl("CustomerInfo")">@T("Account.MyAccount")</a></li>
    @if (Model.BlogEnabled)
    {
        <li><a href="@Url.RouteUrl("Blog")">@T("Blog")</a></li>
    }
    @if (Model.ForumEnabled)
    {
        <li><a href="@Url.RouteUrl("Boards")">@T("Forum.Forums")</a></li>
    }
    <li><a href="@Url.RouteUrl("ContactUs")">@T("ContactUs")</a></li>
    @Html.Action("WidgetsByZone", "Widget", new { widgetZone = "header_menu_after" })
</ul>


But please bear in mind that you will need to do some styling and adjusting of the menu so that it displays correctly. Also you will need to modify the css file for the Categories Header Menu in order to map the new structure of the <ul> and <li> elements of the menu, which will not so straightforward as the menu is designed and structured to work as on the demo.

Hope that helps!