public ActionResult Index() { using (var session = OpenReadSession()) { PageContext model = new PageContext { Page = CMSContext.GetPage(session), CurrentPublishingTarget = CMSContext.GetCurrentPublishingTarget(session), CurrentUser = CMSContext.GetCurrentUser(session), ServerUrl = _Common.ServerUrl, AppBaseUrl = CMSContext.BaseUrl, AppAssetBaseUrl = CMSContext.AssetBaseUrl }; return(View(model)); } }
public ActionResult Accessibility() { using (var session = OpenReadSession()) { PageContext model = new PageContext { Page = CMSContext.GetPage(session), CurrentPublishingTarget = CMSContext.GetCurrentPublishingTarget(session), CurrentUser = CMSContext.GetCurrentUser(session), ServerUrl = _Common.ServerUrl, AppBaseUrl = CMSContext.BaseUrl, AppAssetBaseUrl = CMSContext.AssetBaseUrl, sessionID = session.Id, }; var bcElement = CMSContext.GetPage(session).Element("BodyCopy"); model.BodyCopy = bcElement != null ? bcElement.Value : ""; return(View(model)); } }
public ActionResult Index() { using (var session = OpenReadSession()) { var siteList = new List <string>(); GetSite(CMSContext.GetPage(session), ref siteList); PageContext model = new PageContext { Page = CMSContext.GetPage(session), CurrentPublishingTarget = CMSContext.GetCurrentPublishingTarget(session), CurrentUser = CMSContext.GetCurrentUser(session), ServerUrl = _Common.ServerUrl, AppBaseUrl = CMSContext.BaseUrl, AppAssetBaseUrl = CMSContext.AssetBaseUrl, Site = siteList, sessionID = session.Id }; return(View(model)); } }