Adds 'VariesByCulture` property to ContentItemBasic model & its mapping - so that the GetChildren API call for list view can know if each child item varies by culture or not
This commit is contained in:
@@ -55,6 +55,9 @@ namespace Umbraco.Web.Models.ContentEditing
|
||||
[JsonConverter(typeof(StringEnumConverter))]
|
||||
public ContentSavedState? State { get; set; }
|
||||
|
||||
[DataMember(Name = "variesByCulture")]
|
||||
public bool VariesByCulture { get; set; }
|
||||
|
||||
protected bool Equals(ContentItemBasic other)
|
||||
{
|
||||
return Id == other.Id;
|
||||
|
||||
@@ -82,7 +82,8 @@ namespace Umbraco.Web.Models.Mapping
|
||||
.ForMember(dest => dest.AdditionalData, opt => opt.Ignore())
|
||||
.ForMember(dest => dest.UpdateDate, opt => opt.ResolveUsing<UpdateDateResolver>())
|
||||
.ForMember(dest => dest.Name, opt => opt.ResolveUsing<NameResolver>())
|
||||
.ForMember(dest => dest.State, opt => opt.ResolveUsing<ContentBasicSavedStateResolver<ContentPropertyBasic>>());
|
||||
.ForMember(dest => dest.State, opt => opt.ResolveUsing<ContentBasicSavedStateResolver<ContentPropertyBasic>>())
|
||||
.ForMember(dest => dest.VariesByCulture, opt => opt.MapFrom(src => src.ContentType.VariesByCulture()));
|
||||
|
||||
//FROM IContent TO ContentPropertyCollectionDto
|
||||
//NOTE: the property mapping for cultures relies on a culture being set in the mapping context
|
||||
|
||||
Reference in New Issue
Block a user