Exemple #1
0
        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);
        }
        //
        // GET: /Products/
        public ActionResult Index()
        {
            PageModel.ArticleContent.Title = "DiyFe Products";
            PageModel.ArticleContent.Description = "List of products dealing with ";
            PageModel.ArticleContent.Author = "Do it yourself for everyone.";
            PageModel.ArticleContent.Keywords = "DIY, DIYFE, do it yourself, homesteading, transition";

            ListAccess la = new ListAccess();
            ArticleModel model = new ArticleModel();
            model.MostViewed = la.MostViewed(11, 20);
            model.CrumbLinkList = new List<CustomHtmlLink>();

            return View(model);
        }
Exemple #3
0
        public ActionResult ProjectDetails(string html)
        {
            int articleId = 2;

            ListAccess la = new ListAccess();

            ArticleModel model = new ArticleModel();
            model.ArticleContent.LoadArticle(html);
            model.Comments = la.ArticleComments(articleId);

            PageModel.ArticleContent.Title = model.ArticleContent.Title;
            PageModel.ArticleContent.Description = model.ArticleContent.Description;
            PageModel.ArticleContent.Author = model.ArticleContent.Author;
            PageModel.ArticleContent.Keywords = model.ArticleContent.Keywords;

            return View(model);
        }
Exemple #4
0
        public ActionResult Index()
        {
            ArticleModel model = new ArticleModel();
            model.ArticleContent.LoadArticle(5);

            PageModel.ArticleContent.Title = model.ArticleContent.Title;
            PageModel.ArticleContent.Description = model.ArticleContent.Description;
            PageModel.ArticleContent.Author = model.ArticleContent.Author;
            PageModel.ArticleContent.Keywords = model.ArticleContent.Keywords;

            ListAccess la = new ListAccess();
            model.MostViewed = la.MostViewed(11, 20);

            string url = HttpContext.Request.RawUrl;
            int catigoryId = DIYFEHelper.GetCatigoryRowId(url);

            model.CrumbLinkList = DIYFEHelper.GenerateCrumbLinks(catigoryId, linkPrefix);
            //model.ArticleList = la.ArticleList(catigoryId, 1);

            return View(model);
        }
Exemple #5
0
        public ActionResult FirstLevCategoryList(string categoryUrl)
        {
            ListAccess la = new ListAccess();
            ArticleModel model = new ArticleModel();
            model.MostViewed = la.MostViewed(11, 20);
            //model.CrumbLinkList = new List<CustomHtmlLink>();
            //AppStatic.Categories.Where(c => c.CategoryUrl == categoryUrl);
            PageModel.ArticleContent.Title = model.ArticleContent.Title;
            PageModel.ArticleContent.Description = model.ArticleContent.Description;
            PageModel.ArticleContent.Author = model.ArticleContent.Author;
            PageModel.ArticleContent.Keywords = model.ArticleContent.Keywords;

            string url = HttpContext.Request.RawUrl;
            int catigoryId = DIYFEHelper.GetCatigoryRowId(categoryUrl, "", "");

            model.CrumbLinkList = DIYFEHelper.GenerateCrumbLinks(catigoryId, linkPrefix);
            model.ArticleList = la.ArticleList(catigoryId, 1);
            // model.RelatedTreeView = DIYFEHelper.GenerateRelatedTreeView(catigoryId, linkPrefix);

            return View(model);
        }
Exemple #6
0
        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);
        }