Exemplo n.º 1
0
        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);
        }
Exemplo n.º 2
0
        public static void UpdateSueetieContentPage(SueetieContentPage sueetieContentPage)
        {
            var provider = SueetieDataProvider.LoadProvider();

            provider.UpdateSueetieContentPage(sueetieContentPage);
        }
Exemplo n.º 3
0
        public static void UpdateCmsPermalink(SueetieContentPage sueetieContentPage)
        {
            var provider = SueetieDataProvider.LoadProvider();

            provider.UpdateCMSPermalink(sueetieContentPage);
        }
Exemplo n.º 4
0
        public static int CreateContentPage(SueetieContentPage sueetieContentPage)
        {
            var provider = SueetieDataProvider.LoadProvider();

            return(provider.CreateContentPage(sueetieContentPage));
        }