#3642 - Worked on creating blueprints
This commit is contained in:
@@ -2744,8 +2744,20 @@ namespace Umbraco.Core.Services.Implement
|
||||
content.CreatorId = userId;
|
||||
content.WriterId = userId;
|
||||
|
||||
foreach (var property in blueprint.Properties)
|
||||
content.SetValue(property.Alias, property.GetValue()); //fixme doesn't take into account variants
|
||||
var now = DateTime.Now;
|
||||
var cultures = blueprint.CultureInfos.Any() ? blueprint.CultureInfos.Select(x=>x.Key) : new[] {(string)null};
|
||||
foreach (var culture in cultures)
|
||||
{
|
||||
foreach (var property in blueprint.Properties)
|
||||
{
|
||||
content.SetValue(property.Alias, property.GetValue(culture), culture);
|
||||
}
|
||||
|
||||
content.Name = blueprint.Name;
|
||||
content.SetCultureInfo(culture, blueprint.GetCultureName(culture), now);
|
||||
}
|
||||
|
||||
|
||||
|
||||
return content;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user