public ActionResult NewsDetail(string seoUrl)
        {
            var breadCrumbs = new List <BreadCrumb>();
            var news        = _newsService.Get(x => x.SeoUrl.Equals(seoUrl), true);

            if (news == null)
            {
                return(HttpNotFound());
            }

            var newsLocalized = new News();

            {
                newsLocalized = news.ToModel();

                ViewBag.Title       = newsLocalized.MetaTitle;
                ViewBag.KeyWords    = newsLocalized.MetaKeywords;
                ViewBag.SiteUrl     = Url.Action("NewsDetail", "News", new { seoUrl, area = "" });
                ViewBag.Description = newsLocalized.MetaDescription;
                ViewBag.Image       = Url.Content(string.Concat("~/", newsLocalized.ImageMediumSize));
                ViewBag.MenuId      = newsLocalized.MenuId;
                ViewBag.VirtualId   = newsLocalized.VirtualCategoryId;

                var strArrays = newsLocalized.VirtualCategoryId.Split('/');
                for (var i = 0; i < strArrays.Length; i++)
                {
                    var str      = strArrays[i];
                    var menuLink = _menuLinkService.Get(x => x.CurrentVirtualId.Equals(str));

                    //Lấy bannerId từ post để hiển thị banner trên post
                    if (i == 0)
                    {
                        ViewBag.BannerId = menuLink.Id;
                    }

                    breadCrumbs.Add(new BreadCrumb
                    {
                        Title   = menuLink.GetLocalized(m => m.MenuName, menuLink.Id),
                        Current = false,
                        Url     = Url.Action("GetContent", "Menu", new { area = "", menu = menuLink.SeoUrl })
                    });
                }
                breadCrumbs.Add(new BreadCrumb
                {
                    Current = true,
                    Title   = newsLocalized.Title
                });
                ViewBag.BreadCrumb = breadCrumbs;
            }

            ViewBag.SeoUrl = newsLocalized.MenuLink.SeoUrl;

            return(View(newsLocalized));
        }
        public ActionResult GetStaticContentParent(int menuId, string title, string virtualId)
        {
            var breadCrumbs = new List <BreadCrumb>();
            var virtualIds  = virtualId.Split('/');

            var staticContent = _staticContentService.Get(x => x.MenuId == menuId && x.Status == 1);

            //Convert to localized
            var staticContentLocalized = staticContent.ToModel();

            var viewBag = ViewBag;

            var menuLinks = _menuLinkService.FindBy(x => x.Id == menuId && x.Status == 1);

            //Convert to localized
            menuLinks = menuLinks.Select(x => x.ToModel());

            if (menuLinks.IsAny())
            {
                viewBag.ListItems = menuLinks;
            }

            //var strArrays1 = virtualIds;
            for (var i = 0; i < virtualIds.Length; i++)
            {
                var item     = virtualIds[i];
                var menuLink = _menuLinkService.Get(x => x.CurrentVirtualId.Equals(item) && !x.MenuName.Equals(title));
                if (menuLink != null)
                {
                    breadCrumbs.Add(new BreadCrumb
                    {
                        Title   = menuLink.GetLocalized(x => x.MenuName, menuLink.Id),
                        Current = false,
                        Url     = Url.Action("GetContent", "Menu", new { area = "", menu = menuLink.SeoUrl })
                    });
                }
            }

            breadCrumbs.Add(new BreadCrumb
            {
                Current = true,
                Title   = staticContentLocalized.Title
            });

            ViewBag.TitleNews  = staticContentLocalized.Title;
            ViewBag.BreadCrumb = breadCrumbs;
            ViewBag.Title      = staticContentLocalized.Title;

            return(PartialView(staticContentLocalized));
        }