public int CreateCustomTemplate(string tempName)
        {
            CustomPage page = new CustomPage();

            if (string.IsNullOrEmpty(tempName))
            {
                return(0);
            }
            page = new CustomPage
            {
                Name          = "页面名称",
                CreateTime    = DateTime.Now,
                Status        = 1,
                TempIndexName = (tempName == "none") ? "" : tempName,
                PageUrl       = page.CreateTime.ToString("yyyyMMddHHmmss"),
                Details       = "自定义页面",
                IsShowMenu    = true,
                DraftDetails  = "自定义页面",
                DraftName     = "页面名称",
                DraftPageUrl  = page.PageUrl,
                PV            = 0,
                DraftJson     = (tempName == "none") ? this.GetCustomTempDefaultJson() : this.GetIndexTempJsonByName(tempName),
                FormalJson    = (tempName == "none") ? this.GetCustomTempDefaultJson() : this.GetIndexTempJsonByName(tempName)
            };
            return(CustomPageHelp.Create(page));
        }
Exemplo n.º 2
0
        public int CreateCustomTemplate(string tempName)
        {
            if (string.IsNullOrEmpty(tempName))
            {
                return(0);
            }
            CustomPage customPage = new CustomPage();

            customPage.Name          = "页面名称";
            customPage.CreateTime    = System.DateTime.Now;
            customPage.Status        = 1;
            customPage.TempIndexName = ((tempName == "none") ? "" : tempName);
            customPage.PageUrl       = customPage.CreateTime.ToString("yyyyMMddHHmmss");
            customPage.Details       = "自定义页面";
            customPage.IsShowMenu    = true;
            customPage.DraftDetails  = "自定义页面";
            customPage.DraftName     = "页面名称";
            customPage.DraftPageUrl  = customPage.PageUrl;
            customPage.PV            = 0;
            customPage.DraftJson     = ((tempName == "none") ? this.GetCustomTempDefaultJson() : this.GetIndexTempJsonByName(tempName));
            customPage.FormalJson    = ((tempName == "none") ? this.GetCustomTempDefaultJson() : this.GetIndexTempJsonByName(tempName));
            return(CustomPageHelp.Create(customPage));
        }