public static PagePayload GetCurrentContent() { PagePayload page = new PagePayload(); page.ThePage = SiteData.GetCurrentPage(); page.Load(); return page; }
public ActionResult Default(FormCollection model) { _page = PagePayload.GetCurrentContent(); Object frm = null; if (Request.Form["form_type"] != null) { string formMode = Request.Form["form_type"].ToString().ToLowerInvariant(); if (formMode == "searchform") { frm = new SiteSearch(); frm = FormHelper.ParseRequest(frm, Request); this.ViewData["CMS_searchform"] = frm; if (frm != null) { this.TryValidateModel(frm); } } if (formMode == "contactform") { frm = new ContactInfo(); frm = FormHelper.ParseRequest(frm, Request); var cmt = (ContactInfo)frm; cmt.Root_ContentID = _page.ThePage.Root_ContentID; cmt.CreateDate = SiteData.CurrentSite.Now; cmt.CommenterIP = Request.ServerVariables["REMOTE_ADDR"]; this.ViewData[ContactInfo.Key] = frm; if (cmt != null) { this.TryValidateModel(cmt); } } } return DefaultView(); }
public static PagePayload GetContent(Guid id) { PagePayload page = new PagePayload(); page.ThePage = SiteData.GetPage(id); page.Load(); return page; }
public static PagePayload GetContent(SiteNav nav) { PagePayload page = new PagePayload(); page.ThePage = nav.GetContentPage(); page.Load(); return page; }
public static PagePayload GetContent(ContentPage cp) { PagePayload page = new PagePayload(); page.ThePage = cp; page.Load(); return page; }
public static PagePayload GetContent(Guid id) { PagePayload page = new PagePayload(); page.ThePage = SiteData.GetPage(id); page.Load(); return(page); }
public static PagePayload GetContent(SiteNav nav) { PagePayload page = new PagePayload(); page.ThePage = nav.GetContentPage(); page.Load(); return(page); }
public static PagePayload GetContent(ContentPage cp) { PagePayload page = new PagePayload(); page.ThePage = cp; page.Load(); return(page); }
public static PagePayload GetCurrentContent() { PagePayload page = new PagePayload(); page.ThePage = SiteData.GetCurrentPage(); page.Load(); return(page); }
public override void InitHelpers() { base.InitHelpers(); if (this.ViewData.Model != null && this.ViewData.Model is PagePayload) { this.CmsPage = (PagePayload)this.ViewData.Model; } else { if (this.ViewData[PagePayload.ViewDataKey] == null) { this.CmsPage = PagePayload.GetCurrentContent(); this.ViewData[PagePayload.ViewDataKey] = this.CmsPage; } else { this.CmsPage = (PagePayload)this.ViewData[PagePayload.ViewDataKey]; } } }
public static PagePayload GetContent(string uri) { PagePayload page = new PagePayload(); if (SecurityData.AdvancedEditMode) { using (CMSConfigHelper cmsHelper = new CMSConfigHelper()) { cmsHelper.OverrideKey(uri); if (cmsHelper.cmsAdminContent == null) { page.ThePage = SiteData.GetPage(uri); if (!page.ThePage.IsPageLocked) { if (page.ThePage.ContentType == ContentPageType.PageType.BlogEntry) { var c = page.ThePage.ContentCategories; var t = page.ThePage.ContentTags; } cmsHelper.cmsAdminContent = page.ThePage; } else { cmsHelper.cmsAdminContent = null; } } else { page.ThePage = cmsHelper.cmsAdminContent; if (page.IsPageLocked) { cmsHelper.cmsAdminContent = null; page.ThePage = SiteData.GetPage(uri); } } } } else { page.ThePage = SiteData.GetPage(uri); } page.Load(); return(page); }
protected string GetTemplateFile(ControllerContext ctrlCtx) { ControllerBase controller = ctrlCtx.Controller; string templateFile = String.Empty; if (controller is IContentController) { templateFile = (controller as IContentController).TemplateFile; } else { if (controller.ViewData[PagePayload.ViewDataKey] != null) { PagePayload page = (PagePayload)controller.ViewData[PagePayload.ViewDataKey]; templateFile = page.ThePage.TemplateFile; } } return(templateFile); }
public static PagePayload GetContent(string uri) { PagePayload page = new PagePayload(); if (SecurityData.AdvancedEditMode) { using (CMSConfigHelper cmsHelper = new CMSConfigHelper()) { cmsHelper.OverrideKey(uri); if (cmsHelper.cmsAdminContent == null) { page.ThePage = SiteData.GetPage(uri); if (!page.ThePage.IsPageLocked) { if (page.ThePage.ContentType == ContentPageType.PageType.BlogEntry) { var c = page.ThePage.ContentCategories; var t = page.ThePage.ContentTags; } cmsHelper.cmsAdminContent = page.ThePage; } else { cmsHelper.cmsAdminContent = null; } } else { page.ThePage = cmsHelper.cmsAdminContent; if (page.IsPageLocked) { cmsHelper.cmsAdminContent = null; page.ThePage = SiteData.GetPage(uri); } } } } else { page.ThePage = SiteData.GetPage(uri); } page.Load(); return page; }
public OpenGraph(PagePayload pp) : this() { this.CmsPage = pp; }
public void RefreshPayload() { this.CmsPage = PagePayload.GetCurrentContent(); this.ViewData[PagePayload.ViewDataKey] = this.CmsPage; }
public void OverridePage(PagePayload page) { this.CmsPage = page; this.ViewData[PagePayload.ViewDataKey] = this.CmsPage; }
public static PagePayload GetCurrentContent() { Guid guidContentID = Guid.Empty; PagePayload page = new PagePayload(); page.ThePage = SiteData.GetCurrentPage(); page.Load(); return page; }
public static PagePayload GetContent(string uri) { PagePayload page = new PagePayload(); page.ThePage = SiteData.GetPage(uri); page.Load(); return page; }
public void OverridePage(SiteNav nav) { this.CmsPage = PagePayload.GetContent(nav); this.ViewData[PagePayload.ViewDataKey] = this.CmsPage; }
protected void LoadPage() { if (_page == null) { if (this.ViewData[PagePayload.ViewDataKey] == null) { _page = PagePayload.GetCurrentContent(); this.ViewData[PagePayload.ViewDataKey] = _page; } else { _page = (PagePayload)this.ViewData[PagePayload.ViewDataKey]; } } this.TemplateFile = this.DisplayTemplateFile; }
protected void LoadPage(string Uri) { _page = PagePayload.GetContent(Uri); this.ViewData[PagePayload.ViewDataKey] = _page; this.TemplateFile = this.DisplayTemplateFile; }
protected void LoadPage(string Uri) { _page = PagePayload.GetContent(Uri); this.ViewData[PagePayload.ViewDataKey] = _page; if (_page != null && _page.ThePage.ContentID != Guid.Empty) { _page.HandleTemplatePath(this); } }
public ActionResult TemplatePreview() { PagePayload _page = new PagePayload(); _page.ThePage = ContentPageHelper.GetSamplerView(); _page.ThePage.TemplateFile = SiteData.PreviewTemplateFile; _page.TheSite = SiteData.CurrentSite; _page.TheWidgets = new List<Widget>(); this.ViewData[PagePayload.ViewDataKey] = _page; return View(SiteData.PreviewTemplateFile); }
protected void LoadPage() { if (this.ViewData[PagePayload.ViewDataKey] == null) { _page = PagePayload.GetCurrentContent(); this.ViewData[PagePayload.ViewDataKey] = _page; } else { _page = (PagePayload)this.ViewData[PagePayload.ViewDataKey]; } if (_page != null && _page.ThePage.ContentID != Guid.Empty) { _page.HandleTemplatePath(this); } }