private static SueetieContentPage GetCurrentContentPage() { SueetieContentPage sueetieContentPage = null; var pageId = DataHelper.GetIntFromQueryString("pg", -1); if (pageId > 0) { var allContentPages = GetSueetieContentPageList(); if (allContentPages != null) { sueetieContentPage = allContentPages.Find(p => pageId.Equals(p.ContentPageID)); } } //string _rawUrl = HttpContext.Current.Request.RawUrl.ToLower(); //int _segments = HttpContext.Current.Request.Url.Segments.Length; //if (_rawUrl.IndexOf(".aspx") > 0 && _segments > 3) //{ // int _pageSlugStart = _rawUrl.LastIndexOf("/") + 1; // int _pageSlugEnd = _rawUrl.IndexOf(".aspx"); // int _pageSlugLength = _pageSlugEnd - _pageSlugStart; // string _rawGroupKey = _rawUrl.Substring(1, _pageSlugStart -2); // string _rawSlug = _rawUrl.Substring(_pageSlugStart, _pageSlugLength); // List<SueetieContentPage> _allContentPages = SueetieContentParts.GetSueetieContentPageList(); // foreach (SueetieContentPage _page in _allContentPages) // { // if (_page.GroupKey == _rawGroupKey && _page.PageSlug == _rawSlug) // sueetieContentPage = _page; // } //} return(sueetieContentPage); }
public static void UpdateSueetieContentPage(SueetieContentPage sueetieContentPage) { var provider = SueetieDataProvider.LoadProvider(); provider.UpdateSueetieContentPage(sueetieContentPage); }
public static void UpdateCmsPermalink(SueetieContentPage sueetieContentPage) { var provider = SueetieDataProvider.LoadProvider(); provider.UpdateCMSPermalink(sueetieContentPage); }
public static int CreateContentPage(SueetieContentPage sueetieContentPage) { var provider = SueetieDataProvider.LoadProvider(); return(provider.CreateContentPage(sueetieContentPage)); }