Merge branch 'v8/dev' into feature/5702-custom-validation-messages
This commit is contained in:
@@ -45,10 +45,10 @@ namespace Umbraco.Web.Models.Mapping
|
||||
if (source.NodeObjectType == Constants.ObjectTypes.Member && target.Icon.IsNullOrWhiteSpace())
|
||||
target.Icon = "icon-user";
|
||||
|
||||
if (source.NodeObjectType == Constants.ObjectTypes.Media && source is IContentEntitySlim contentSlim)
|
||||
if (source is IContentEntitySlim contentSlim)
|
||||
source.AdditionalData["ContentTypeAlias"] = contentSlim.ContentTypeAlias;
|
||||
|
||||
if (source.NodeObjectType == Constants.ObjectTypes.Media && source is IMediaEntitySlim mediaSlim)
|
||||
if (source is IMediaEntitySlim mediaSlim)
|
||||
source.AdditionalData["MediaPath"] = mediaSlim.MediaPath;
|
||||
|
||||
// NOTE: we're mapping the objects in AdditionalData by object reference here.
|
||||
|
||||
@@ -26,7 +26,7 @@ namespace Umbraco.Web.Models.Mapping
|
||||
target.ContentId = source.ContentId;
|
||||
target.CreateDateUtc = source.CreateDateUtc;
|
||||
target.Culture = source.Culture;
|
||||
target.DestinationUrl = source.ContentId > 0 ? UmbracoContext?.UrlProvider?.GetUrl(source.ContentId, source.Culture) : "#";
|
||||
target.DestinationUrl = source.ContentId > 0 ? UmbracoContext?.UrlProvider?.GetUrl(source.ContentId, culture: source.Culture) : "#";
|
||||
target.OriginalUrl = UmbracoContext?.UrlProvider?.GetUrlFromRoute(source.ContentId, source.Url, source.Culture);
|
||||
target.RedirectId = source.Key;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user