Example #1
0
        private BacklinkViewModel GetBackLinkCategory(string alias)
        {
            var backlink = new BacklinkViewModel()
            {
                Name  = SystemVariable.HeadMenu.FirstOrDefault(b => b.Alias == alias).Name.ToString(),
                Alias = alias
            };

            return(backlink);
        }
Example #2
0
        private BacklinkViewModel GetBacklinkForList(string alias)
        {
            var category = Commons.SystemVariable.Categorys.FirstOrDefault(p => p.Alias == alias);
            var backlink = new BacklinkViewModel()
            {
                Name  = category.Name,
                Alias = category.Alias
            };

            return(backlink);
        }
Example #3
0
        private BacklinkViewModel GetBackLinkPost(string alias)
        {
            var cateId   = SystemVariable.MenuItem.FirstOrDefault(p => p.Alias == alias).CategoryId.ToString();
            var category = SystemVariable.HeadMenu.FirstOrDefault(c => c.Id == int.Parse(cateId));
            var backlink = new BacklinkViewModel()
            {
                Name  = category.Name,
                Alias = category.Alias
            };

            return(backlink);
        }
Example #4
0
        private BacklinkViewModel GetBacklinkForDetail(string alias)
        {
            var cateid   = Commons.SystemVariable.Posts.FirstOrDefault(p => p.Alias == alias).HeadId;
            var category = Commons.SystemVariable.Categorys.FirstOrDefault(c => c.Id == cateid);
            var backlink = new BacklinkViewModel()
            {
                Name  = category.Name,
                Alias = category.Alias
            };

            return(backlink);
        }