Ejemplo n.º 1
0
        public ActionResult NewsItem()
        {
            if (Session["BXGOwner"] == null)
            {
                if (Session["_path_info"] != null)
                {
                    Session["_path_info"] = Request.RawUrl;
                }

                Response.Redirect(ConfigurationManager.AppSettings["bxgwebUnsecureURL"] + "default.aspx?sess=timeout", true);
            }

            var model = NewsItemMapper.Map(CurrentPage);

            model = MasterMapper.Map(model, CurrentPage);

            if (string.IsNullOrWhiteSpace(model.RedirectUrl))
            {
                return(View("NewsItem", model));
            }
            else
            {
                return(Redirect(model.RedirectUrl));
            }
        }
Ejemplo n.º 2
0
        //
        // GET: /FrontPage/

        public ActionResult NewsPage(RenderModel renderModel)
        {
            var model = new NewsPageModel()
            {
                NewsItems = NewsItemMapper.Map <NewsItem>(CurrentPage)
            };

            return(View(model));
        }
Ejemplo n.º 3
0
        //
        // GET: /FrontPage/

        public ActionResult FrontPage(RenderModel renderModel)
        {
            var model = new FrontPageModel()
            {
                Header       = CurrentPage.GetPropertyValue <string>("header"),
                BodyText     = CurrentPage.GetPropertyValue <IHtmlString>("bodyText"),
                Image        = GetImage(),
                FeaturedNews = NewsItemMapper.Map <NewsItem>(CurrentPage.Children.FirstOrDefault(x => x.IsDocumentType("NewsPage")))
            };

            return(View(model));
        }