public ActionResult Index() { List<CMSPageDisplay> slides = new List<CMSPageDisplay>(); CMSPageDisplay splash = new CMSPageDisplay(); CMSPage slide1 = _cmsService.SelectAllByPath("home-slide-1"); CMSPage slide2 = _cmsService.SelectAllByPath("home-slide-2"); CMSPage slide3 = _cmsService.SelectAllByPath("home-slide-3"); CMSPage splashContent = _cmsService.SelectAllByPath("splash-content"); if (slide1 != null) slides.Add(slide1.ToDisplay()); if (slide2 != null) slides.Add(slide2.ToDisplay()); if (slide3 != null) slides.Add(slide3.ToDisplay()); if (splashContent != null) splash = (splashContent.ToDisplay()); CmsContentGroupViewModel model = new CmsContentGroupViewModel(); model.Pages = slides; model.Splash = splash; return View(model); }
public ActionResult Registration() { List<CMSPageDisplay> sideContent = new List<CMSPageDisplay>(); CMSPage step1 = _cmsService.SelectAllByPath("user-reg-step1"); CMSPage step2 = _cmsService.SelectAllByPath("user-reg-step2"); CMSPage step3 = _cmsService.SelectAllByPath("user-reg-step3"); CMSPage step4 = _cmsService.SelectAllByPath("user-reg-step4"); if (step1 != null) sideContent.Add(step1.ToDisplay()); if (step2 != null) sideContent.Add(step2.ToDisplay()); if (step3 != null) sideContent.Add(step3.ToDisplay()); if (step4 != null) sideContent.Add(step4.ToDisplay()); CmsContentGroupViewModel model = new CmsContentGroupViewModel(); model.Pages = sideContent; return View("Registration", model); }