611 users online
Register
Log in
Shopping Cart
(0)
Home
Product
Overview
Features
Store demo
Screenshots
Showcase - live shops
Copyright Notice Removal
System Requirements
Roadmap
Contribute
Team Members
License
Downloads
Download nopCommerce
Extensions
Release Notes
Support
Documentation
Forums
Partners
Recommended Hosting
Solution Partners
Become a Partner
Community sponsorship program
My Account
Contacts
Tweet
Home
/
Forums
/
General
/
Development
/
Menu Creation Sub, Sub Categories
Menu Creation Sub, Sub Categories
Reply
thomen
Total Posts:
157
Karma:
819
Joined:
5/25/2010
Location:
Australia
PM
Posted:
3 months ago
Quote
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!
0
Please
login or register
to vote for this post.
(click on this box to dismiss)