Try your search with a different keyword or use * as a wildcard.
@model TopMenuModel
@using Nop.Core.Domain.Catalog
@using Nop.Core.Domain.Topics
@functions {
async Task CategoryLine(TopMenuModel.CategoryLineModel lineModel)
{
@lineModel.Category.Name
@if (lineModel.Category.NumberOfProducts.HasValue)
{
@T("Categories.TotalProducts", lineModel.Category.NumberOfProducts.Value)
}
@{
//subcategories
var subCategories = lineModel.ResponsiveMobileMenu ?
//responsive (all categories)
lineModel.Category.SubCategories :
//standard design (only categories with "IncludeInTopMenu")
lineModel.Category.SubCategories.Where(x => x.IncludeInTopMenu).ToList();
var levelClass = "";
if (lineModel.Level == 0)
{
levelClass = "first-level";
}
if (subCategories.Count > 0)
{
@foreach (var subCategory in subCategories)
{
var categoryLineModel = new TopMenuModel.CategoryLineModel
{
Category = subCategory,
Level = lineModel.Level + 1,
ResponsiveMobileMenu = lineModel.ResponsiveMobileMenu
};
await CategoryLine(categoryLineModel);
}
}
}
}
}
@{
var rootCategoriesResponsive = Model.Categories.ToList();
//name it "Categories" if we have only categories. Otherwise, "Menu"
var responsiveMenuTitle = Model.HasOnlyCategories ? T("Categories") : T("Menu");
@if (Model.UseAjaxMenu)
{
}
else
{
}
}