简体   繁体   中英

set media url in sitecore 7.x

We have plugin for sitecore that allows content translation. When page is selected to be translated to different language new version of the target language is created and fields are updated with the translated content. We also translate images therefore we have to change image path in the target item or just copy the same url in some cases. Getting the url is quite simple with:

Sitecore.Resources.Media.MediaManager.GetMediaUrl(imageField.MediaItem)

however we cannot determine the way to modify / set this field after MediaPath has been deprecated in sitecore 7. Can anybody come up with suggestions?

Thanks a lot

为了设置/更新sitecore 7.x中的媒体URL,除了为图像字段设置mediapath属性之外,还必须设置MediaID。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM