Exemplo n.º 1
0
        protected virtual ActionResult ViewPage()
        {
            var layout = (new Layout(Site, PageContext.PageLayout).LastVersion()).AsActual();

            if (layout == null)
            {
                throw new KoobooException(string.Format("The layout does not exists. Layout name:{0}".Localize(), PageContext.PageLayout));
            }
            ViewResult viewResult = new FrontViewResult(ControllerContext, layout.FileExtension.ToLower(), layout.TemplateFileVirutalPath);

            if (viewResult != null)
            {
                viewResult.ViewData = this.ViewData;
                viewResult.TempData = this.TempData;
            }

            return viewResult;
        }
Exemplo n.º 2
0
        protected virtual ActionResult ViewPage()
        {
            var layout = (new Layout(Site, PageContext.PageLayout).LastVersion()).AsActual();

            ViewResult viewResult = new FrontViewResult(ControllerContext, layout.FileExtension.ToLower(), layout.TemplateFileVirutalPath);

            if (viewResult != null)
            {
                viewResult.ViewData = this.ViewData;
                viewResult.TempData = this.TempData;
            }

            return viewResult;
        }