Hi ,
I am having problems editing subcategory view and model :
View: Category Template Grid or Lines
@*subcategories*@
@if (Model.SubCategories.Count > 0)
{
<div class="sub-category-grid">
@(Html.DataList<CategoryModel.SubCategoryModel>(Model.SubCategories, 3,
@<div class="item-box">
<div class="sub-category-item">
<h2 class="category-title">
<a href="@Url.RouteUrl("Category", new { categoryId = item.Id, SeName = item.SeName })" title="@item.PictureModel.Title">
@item.Name</a>
</h2>
@*Want to add subcategory products here *@
@* Tried something like:@item.Products.Name but failed *@
<div class="picture">
<a href="@Url.RouteUrl("Category", new { categoryId = item.Id, SeName = item.SeName })" title="@item.PictureModel.Title">
</a>
</div>
</div>
</div>
))
</div>
<div class="clear">
</div>
}
Sub category Model:
public class SubCategoryModel : BaseNopEntityModel
{
public SubCategoryModel()
{
PictureModel = new PictureModel();
Products = new ProductModel();
}
public string Name { get; set; }
public string SeName { get; set; }
public PictureModel PictureModel { get; set; }
public ProductModel Products { get; set; }
}
Any ideas what i am doing wrong??