private static string BeginTitleTag(DomainModel.Entities.Category category, bool selected, WebUi.ViewModels.ListingInfo inf) { string titleUrl = string.Format( "<a onclick=\"return ToggleAccordionList('{0}');\" href=\"/Desktop/List/{1}/page{2}/sort{3}\">{4}</a>", category.CategoryId, category.UrlName, 1, inf.CurrentSortOption, category.CategoryName); return(string.Format( "<div class=\"accordion_list_title\">" + "{0}" + "</div>" + "<div id=\"{1}\" class=\"accordion_dropdown\" style=\"display: {2};\">", titleUrl, category.CategoryId, selected ? "block" : "none")); }
private static string GetSubcategoryTag(HtmlHelper html, DomainModel.Entities.Category category, DomainModel.Entities.Category sub, bool selected, WebUi.ViewModels.ListingInfo inf) { MvcHtmlString url = System.Web.Mvc.Html.LinkExtensions.ActionLink( html, sub.CategoryName, WebUi.ViewModels.NavigationKeys.ProductListAction, WebUi.ViewModels.NavigationKeys.DesktopController, new { category = category.UrlName, subcategory = sub.UrlName, page = selected ? inf.CurrentPage : 1, sort = inf.CurrentSortOption }, null); return(string.Format( "<div class=\"accordion_list_item{0}\">" + "{1}" + "</div>", selected?"_selected":"", url.ToString())); }