Esempio n. 1
0
        /// <summary>
        /// Indexes this instance.
        /// </summary>
        /// <param name="currentPage">The current page.</param>
        /// <returns></returns>
        public ActionResult Index(Home currentPage)
        {
            var quotePage = currentPage.QuoteLink.Id != null ?
                _documentSession.Load<BaseModel>(currentPage.QuoteLink.Id) :
                null;
            var viewModel = new HomeViewModel
                                {
                                    CurrentPage = currentPage,
                                    Pages = _structureInfo.Pages,
                                    QuotePage = quotePage,
                                    RootPage = _structureInfo.StartPage
                                };

            ViewBag.Class = "home";

            return View(viewModel);
        }
Esempio n. 2
0
        /// <summary>
        /// Indexes this instance.
        /// </summary>
        /// <param name="currentPage">The current page.</param>
        /// <returns></returns>
        public ActionResult Index(Home currentPage)
        {
            var quotePage = currentPage.QuoteLink.Id != null ?
                _documentSession.Load<IPageModel>(currentPage.QuoteLink.Id) :
                null;

            var viewModel = new HomeViewModel
                                {
                                    CurrentPage = currentPage,
                                    NavigationContext = _structureInfo.NavigationContext,
                                    QuotePage = quotePage
                                };

            ViewBag.Class = "home";

            return View(viewModel);
        }