poyker wrote:
What you have done is great but I just want to make sure the other guys don't get the wrong impression that the same is not possible with the free header menu plugin.
Yes - this is only possible because nop-templates developed the nopCategories Header Menu in the first place.
In order to achieve the dropdown for non category or manufacturer items I had to add in some jquery and modify some css, I should state it no longer uses the superfish js or css.
You can add in the jquery and css to the exisiting free nop Categories Header Menu without affecting it's current function of displaying categories and manufacturer menus.
It still functions the same way as the free nop Categories Header Menu if you don't use the modified css, however should someone require the extra drop down menu items they are now an easy modification - just a case of adding a <ul> tag here or there.
Within CategoriesHeaderMenu.cshtml
Simply :@model CategoriesHeaderMenuModel
@using SevenSpikes.Nop.Plugins.CategoriesHeaderMenu.Models
@using Nop.Web.Models.Common;
@{
Html.AppendCssFileParts("~/Plugins/SevenSpikes.Nop.Plugins.CategoriesHeaderMenu/Themes/" + Model.Theme + "/Content/style.css");
Html.AppendScriptParts("~/Plugins/SevenSpikes.Nop.Plugins.CategoriesHeaderMenu/Scripts/jquery.dropdownPlain.js");
Html.AppendScriptParts("~/Plugins/SevenSpikes.Nop.Plugins.CategoriesHeaderMenu/Scripts/jquery-1.3.1.min");
}
<div id="page-wrap">
<ul class="dropdown">
@Html.Raw(Model.CategoriesHtml)
to function as the standard nopCategories Header Menu
In order to create the dropdowns the code now is: <li><a href="#">@T("Categories")</a>
<ul class="sub_menu">
@Html.Raw(Model.CategoriesHtml)
</ul>
And for menu items made from topics:<li><a href="#">Information</a>
<ul class="sub_menu">
<li><a href="#">Our Company</a>
<ul>
<li><a href="@Url.RouteUrl("Topic", new { SystemName = "aboutus" })">@T("AboutUs")</a></li>
<li><a href="@Url.RouteUrl("NewsArchive")">@T("News")</a></li>
<li><a href="@Url.RouteUrl("Boards")">@T("Forum.Forums")</a>
</ul>
</li>
<li><a href="@Url.RouteUrl("Sitemap")">@T("Sitemap")</a></li>
<li><a href="@Url.RouteUrl("Topic", new { SystemName = "shippinginfo" })">@T("ShippingReturns")</a></li>
<li><a href="@Url.RouteUrl("Topic", new { SystemName = "privacyinfo" })">@T("PrivacyNotice")</a></li>
<li><a href="@Url.RouteUrl("Topic", new { SystemName = "conditionsofUse" })">@T("ConditionsOfUse")</a></li>
</ul>
</li>
Hope that clarifies - slight modification to the nopCategories Header Menu (the js and css) that now gives the option to show topics as drop downs without affecting the original function of displaying categories as a header menu.
(many thanks to nop-templates.com for making it free and allowing its modification)