Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
mzanoni committed Jan 13, 2023
2 parents a06775e + 1bf2d91 commit 3120c3a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Integrations.Umbraco/Services/ContentMapper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ private async Task AutoMapOrUseMapper(MapContent content, List<string> culturesT
contentUpdate.Content.Data ??= new Dictionary<string, DataValue?>();
contentUpdate.Content.Data.Add(Constants.VersionKey, content.Version);
contentUpdate.Content.Data.Add("contentTypeAlias", content.PublishedContent.ContentType.Alias);
contentUpdate.Content.Data.Add("url", content.PublishedContent.Url(null, UrlMode.Absolute));
contentUpdate.Content.Data.Add("url", new Multilingual(culturesToPublish.Select(x => new Multilingual.Value(x, content.PublishedContent.Url(x, UrlMode.Absolute))).ToList()));
contentUpdate.Content.Data.Add("createdAt", new DateTimeOffset(content.PublishedContent.CreateDate).ToUnixTimeSeconds());

bool TryGetMapper(MapContent mapContent, [NotNullWhen(true) ]out IContentTypeMapping? contentTypeMapping)
Expand All @@ -97,7 +97,7 @@ bool TryGetMapper(MapContent mapContent, [NotNullWhen(true) ]out IContentTypeMap

private static Multilingual MapDisplayName(IPublishedContent content, List<string> culturesToPublish)
{
return new Multilingual(culturesToPublish.Select(x => new Multilingual.Value(x, content.Name)).ToList());
return new Multilingual(culturesToPublish.Select(x => new Multilingual.Value(x, content.Name(x))).ToList());
}

private static string GetDefaultCulture(UmbracoContextReference umbracoContextReference)
Expand Down

0 comments on commit 3120c3a

Please sign in to comment.