public ActionResult PostDetails(string html) { int _categoryId = 0; ListAccess la = new ListAccess(); ArticleModel model = new ArticleModel(); model.ArticleContent.LoadArticle(html); model.Comments = la.ArticleComments(model.ArticleContent.ArticleId); if (model.ArticleContent.CategoryId > 0) { _categoryId = model.ArticleContent.CategoryId; } else if (model.ArticleContent.SecondLevCategoryId > 0) { _categoryId = model.ArticleContent.SecondLevCategoryId; } else { _categoryId = model.ArticleContent.ThirdLevCategoryId; } PageModel.ArticleContent.Title = model.ArticleContent.Title; PageModel.ArticleContent.Description = model.ArticleContent.Description; PageModel.ArticleContent.Author = model.ArticleContent.Author; PageModel.ArticleContent.Keywords = model.ArticleContent.Keywords; model.MostViewed = la.MostViewed(_categoryId, 20); model.RelatedTreeView = DIYFEHelper.GenerateTreeViewSecondLev(_categoryId, linkPrefix); return(View(model)); }
public ActionResult SecondLevCategoryList(string categoryUrl, string subCategoryUrl) { string url = HttpContext.Request.RawUrl; int catigoryId = DIYFEHelper.GetCatigoryRowId(categoryUrl, subCategoryUrl, ""); ListAccess la = new ListAccess(); ArticleModel model = new ArticleModel(); PageModel.ArticleContent.Title = model.ArticleContent.Title; PageModel.ArticleContent.Description = model.ArticleContent.Description; PageModel.ArticleContent.Author = model.ArticleContent.Author; PageModel.ArticleContent.Keywords = model.ArticleContent.Keywords; model.MostViewed = la.MostViewed(11, 20); model.CrumbLinkList = DIYFEHelper.GenerateCrumbLinks(catigoryId, linkPrefix); model.ArticleList = la.ArticleList(catigoryId, 1); //model.RelatedTreeView = DIYFEHelper.GenerateRelatedTreeView(catigoryId, linkPrefix); model.RelatedTreeView = DIYFEHelper.GenerateTreeViewSecondLev(catigoryId, linkPrefix); return(View(model)); }