Hello David,
Yes, version 7 is still supported, at the we provide support for Kentico 6, 7 and 8.
Thank you for your reply. You would need to set the setting opject as follows:
settings.ExportType = ExportTypeEnum.All
Here are the available options:
<member name="T:CMS.CMSImportExport.ExportTypeEnum">
<summary>
Export type enumeration
</summary>
</member>
<member name="F:CMS.CMSImportExport.ExportTypeEnum.None">
<summary>
No objects
</summary>
</member>
<member name="F:CMS.CMSImportExport.ExportTypeEnum.All">
<summary>
All objects
</summary>
</member>
<member name="F:CMS.CMSImportExport.ExportTypeEnum.Site">
<summary>
Site objects
</summary>
</member>
<member name="F:CMS.CMSImportExport.ExportTypeEnum.Default">
<summary>
Default
</summary>
I believe you will only export site-specific object if you set the property to the following: CMS.CMSImportExport.ExportTypeEnum.Site
Additionally, here are some sample settings just for future reference since the documentation does not include many of these:
try
{
SiteExportSettings settings = new SiteExportSettings(); // Prepare settings for the export
settings.SiteName = "siteName"; // Set site name if site is exported
// settings.SiteId = siteId; // or site id
settings.WebsitePath = "websitePath"; // Optionally set website path (full path or relative)
settings.TargetPath = "targetPath"; // Optionally set target path (full path or relative)
settings.TemporaryFilesPath = "tmpPath"; // Optionally set temporary files path (full path or relative)
settings.ExportType = ExportTypeEnum.All; // Export type (All, None, Default…)
settings.TimeStamp = DateTimeHelper.ZERO_TIME; // Set DateTime for incremental deployment
// Set if files should be exported
settings.CopyFiles = true;
// Set if the exported data sould be packed (for web templates used false)
settings.CreatePackage = true;
// Objects which code name starts with excluded name will not be exported
settings.ExcludedNames = string[] {"test"};
// Ensure objects preselection due to previous settings with all child and related objects
settings.LoadDefaultSelection();
// Ensure only specific object selection with ExportType set to None
// settings.SetObjectsProcessType(ProcessObjectEnum.Selected, SiteObjectType.WEBPART, false);
// settings.SetSelectedObjects(new string[] { "codeName" }, SiteObjectType.WEBPART, false);
// All objects of specified type will be exported
settings.SetObjectsProcessType(ProcessObjectEnum.All, SiteObjectType.INLINECONTROL, false);
// Documents related settings
settings.SetSettings(ImportExportHelper.SETTINGS_DOC_HISTORY, false);
settings.SetSettings(ImportExportHelper.SETTINGS_DOC_ACLS, false);
settings.SetSettings(ImportExportHelper.SETTINGS_DOC_RELATIONSHIPS, false);
settings.SetSettings(ImportExportHelper.SETTINGS_EVENT_ATTENDEES, false);
settings.SetSettings(ImportExportHelper.SETTINGS_BLOG_COMMENTS, false);
// Object type specific settings
settings.SetSettings(ImportExportHelper.SETTINGS_BIZFORM_DATA, false);
settings.SetSettings(ImportExportHelper.SETTINGS_FORUM_POSTS, false);
// Object files and folders
settings.SetSettings(ImportExportHelper.SETTINGS_GLOBAL_FOLDERS, false);
settings.SetSettings(ImportExportHelper.SETTINGS_SITE_FOLDERS, false);
settings.SetSettings(ImportExportHelper.SETTINGS_COPY_ASPX_TEMPLATES_FOLDER, false);
// Export
ExportProvider.ExportObjectsData(settings);
}
catch(Exception ex)
{
// Handle error during export process
}
Best regards, Martin