public static void AssignSiteExportNewIDs(SiteExport se)
        {
            se.NewSiteID = Guid.NewGuid();

            se.TheSite.SiteID = se.NewSiteID;

            foreach (var p in se.ThePages)
            {
                AssignContentPageExportNewIDs(p);

                if (p.ThePage.ContentType == ContentPageType.PageType.BlogEntry)
                {
                    p.ThePage.ContentCategories.ToList().ForEach(r => r.CategorySlug = se.TheCategories.Where(x => x.ContentCategoryID == r.ContentCategoryID).FirstOrDefault().CategorySlug);
                    p.ThePage.ContentTags.ToList().ForEach(r => r.TagSlug            = se.TheTags.Where(x => x.ContentTagID == r.ContentTagID).FirstOrDefault().TagSlug);
                }
            }

            se.ThePages.Where(p => p.ThePage.ContentType == ContentPageType.PageType.BlogEntry).ToList()
            .ForEach(r => r.ThePage.PageSlug = ContentPageHelper.ScrubFilename(r.ThePage.Root_ContentID, r.ThePage.PageSlug));

            se.ThePages.Where(p => p.ThePage.ContentType == ContentPageType.PageType.BlogEntry).ToList()
            .ForEach(q => q.ThePage.FileName = ContentPageHelper.ScrubFilename(q.ThePage.Root_ContentID, String.Format("/{0}/{1}", q.ThePage.GoLiveDate.ToString(se.TheSite.Blog_DatePattern), q.ThePage.PageSlug)));

            se.ThePages.ToList().ForEach(r => r.ThePage.FileName = ContentPageHelper.ScrubFilename(r.ThePage.Root_ContentID, r.ThePage.FileName));
        }
Exemplo n.º 2
0
        public static SiteExport GetSerializedSiteExport(Guid siteID)
        {
            SiteExport c = null;

            try {
                string sXML = GetSerialized(siteID);
                c = GetSerialData <SiteExport>(sXML) as SiteExport;
            } catch (Exception ex) { }
            return(c);
        }
Exemplo n.º 3
0
        public static void AssignSiteExportNewIDs(SiteExport se)
        {
            se.NewSiteID = Guid.NewGuid();

            se.TheSite.SiteID = se.NewSiteID;

            foreach (var p in se.ThePages)
            {
                AssignContentPageExportNewIDs(p);
            }
        }
		protected void Page_Load(object sender, EventArgs e) {
			guidImportID = GetGuidParameterFromQuery("importid");

			litMessage.Text = "";

			iPageCount = pageHelper.GetSitePageCount(SiteID, ContentPageType.PageType.ContentEntry);

			if (guidImportID != Guid.Empty) {
				exSite = ContentImportExportUtils.GetSerializedSiteExport(guidImportID);

				litName.Text = exSite.TheSite.SiteName;
				litDescription.Text = exSite.TheSite.SiteTagline;
				litImportSource.Text = exSite.CarrotCakeVersion;
				litDate.Text = exSite.ExportDate.ToString();

				if (!IsPostBack) {
					BindData();
				}
			}
		}
Exemplo n.º 5
0
        public static SiteExport DeserializeSiteExport(string sXML)
        {
            SiteExport c = GetSerialData <SiteExport>(sXML) as SiteExport;

            return(c);
        }
Exemplo n.º 6
0
        public static string GetContentPageExportXML(Guid siteID)
        {
            SiteExport exp = GetExportSite(siteID);

            return(GetExportXML <SiteExport>(exp));
        }
Exemplo n.º 7
0
        public static SiteExport GetExportSite(Guid siteID, SiteExport.ExportType exportWhat)
        {
            SiteExport site = new SiteExport(siteID, exportWhat);

            return(site);
        }
Exemplo n.º 8
0
        public static SiteExport GetExportSite(Guid siteID)
        {
            SiteExport site = new SiteExport(siteID);

            return(site);
        }