Hi,
I cannot seem to find where I need to remove the sub category in grid form that shows on the subcategory pages with the sub category titles in version 4.20
Regards
.category-page .sub-category-grid {
display: none;
}
@*<div class="category-grid sub-category-grid">
...
</div>*@
var subCategoriesCacheKey = string.Format(NopModelCacheDefaults.CategorySubcategoriesKey,
category.Id,
pictureSize,
string.Join(",", _workContext.CurrentCustomer.GetCustomerRoleIds()),
_storeContext.CurrentStore.Id,
_workContext.WorkingLanguage.Id,
_webHelper.IsCurrentConnectionSecured());
model.SubCategories = _cacheManager.Get(subCategoriesCacheKey, () =>
_categoryService.GetAllCategoriesByParentCategoryId(category.Id)
.Select(x =>
{
var subCatModel = new CategoryModel.SubCategoryModel
{
Id = x.Id,
Name = _localizationService.GetLocalized(x, y => y.Name),
SeName = _urlRecordService.GetSeName(x),
Description = _localizationService.GetLocalized(x, y => y.Description)
};
//prepare picture model
var categoryPictureCacheKey = string.Format(NopModelCacheDefaults.CategoryPictureModelKey, x.Id, pictureSize, true, _workContext.WorkingLanguage.Id, _webHelper.IsCurrentConnectionSecured(), _storeContext.CurrentStore.Id);
subCatModel.PictureModel = _cacheManager.Get(categoryPictureCacheKey, () =>
{
var picture = _pictureService.GetPictureById(x.PictureId);
var pictureModel = new PictureModel
{
FullSizeImageUrl = _pictureService.GetPictureUrl(picture),
ImageUrl = _pictureService.GetPictureUrl(picture, pictureSize),
Title = string.Format(_localizationService.GetResource("Media.Category.ImageLinkTitleFormat"), subCatModel.Name),
AlternateText = string.Format(_localizationService.GetResource("Media.Category.ImageAlternateTextFormat"), subCatModel.Name)
};
return pictureModel;
});
return subCatModel;
}).ToList());
.category-page .sub-category-grid {
display: none;
}
@*<div class="category-grid sub-category-grid">
...
</div>*@