SiteMediaRoot does not exist in SiteDefinition

Vote:
 

Hi,

We want to export only medias from existing database

by adding ExportSource to dataExporter.SourceRoots.

We expected to see SiteMediaRoot mentioned in the article

http://world.episerver.com/Documentation/Items/Developers-Guide/EPiServer-CMS/75/Content/Assets-and-media/Media-types-and-templates/

but it does not exist in EPiServer.Web.SiteDefinition.Current
When we tried to use GlobalAssetsRoot both Shared Blocks and Media content were exported.

But how to export only Media?

 

 

 

#80161
Jan 15, 2014 22:59
Vote:
 

The documentation is not correct, there is a SiteAssetRoot that contain both media, folders and blocks (and possibly other content).

There is an event EPiServer.Enterprise.DataExporter.ContentExporting 

you can set up an eventhandler for. In the argument of type ContentExportingEventArgs you can check if the content is not media or folder then you can set Cancel=true on the event args to prevent the content from being exported.

Note however that the content it self is not part of the argument so you load it using argument ContentLink to find the actual type.

#80236
Jan 17, 2014 12:01
Vote:
 

Thanks, Johan, It works!

#80254
Jan 17, 2014 15:37
This topic was created over six months ago and has been resolved. If you have a similar question, please create a new topic and refer to this one.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.