public string Category(Category category, ProductSortByField productSortByField, int pageNumber) { if (!string.IsNullOrEmpty(category.Slug)) { //return string.Format(@"/{0}-t{1}/{2}.aspx", tabWithCatalogMainDispatch.TabName, tabWithCatalogMainDispatch.TabID, category.Slug); //List<string> categorySlugs = storeContext.CategoryBreadcrumb.ConvertAll(c => c.Slug); //categorySlugs.Remove(category.Slug); List <string> categorySlugs = category.GetAllParents().ConvertAll(c => c.Slug); List <string> otherParams = new List <string>(); if (!string.IsNullOrEmpty(productSortByField.Field)) { otherParams.Add("sb=" + productSortByField.GetValueString()); } if (pageNumber > 1) { otherParams.Add("pg=" + pageNumber); } return(SlugUrl(categorySlugs, category.Slug, otherParams.ToArray())); } else { return(CategoryHome()); } }
public string Category(Category category, ProductSortByField productSortByField) { return(Category(category, productSortByField, 1)); }