Hi I know I personally dislike more than one set of subcategories but the guy im doing a site for has requested a nav like
Category:
Subcategory 1
Subcategory 2
Sub Sub Category 1
Sub Sub Category 2
Subcategory 3
I have setup the structure in nop but in my subcategoriesbyparentid.cshtml
@model IList<CategoryModel>
@using Nop.Web.Framework.UI;
@using Nop.Web.Models.Catalog;
@if (Model.Count() > 0)
{
<ul>
@foreach (var item in Model)
{
<li><a href="@Url.RouteUrl("Category", new { categoryId = item.Id, SeName = item.SeName })"><span>@Html.DisplayFor(modelItem => item.Name)</span>@if (@item.SubCategories.Count > 0)
{<span class="icon"> </span>}</a>
@Html.Action("SubCategoriesByParentId", "Catalog", new { parentId = item.Id })
</li>
}
</ul>
}
that all returns fine.. but my:
@if (@item.SubCategories.Count > 0)
{<span class="icon"> </span>}
never has a count > 0 when in a subcategory trying to list further subcategories!