[ContentType(DisplayName = "Parent Item Block",
Description = "Parent Item",
GUID = "32BE18A5-5300-4D04-9414-3BB8E3EFFE2C",
GroupName = "Navigation")]
public class ParentItemBlock : BlockData
{
[Display(Name = "Parent Menu Title", Order = 10)]
public virtual string ParentMenuItemTitle { get; set; }
[Display(Name = "Parent Menu Link", Order = 30)]
[JsonProperty]
[JsonConverter(typeof(UrlConverter))]
public virtual Url ParentItemLink { get; set; }
[Display(Name = "Child Items", Description = "A collection of of child links", Order = 40)]
[EditorDescriptor(EditorDescriptorType = typeof(CollectionEditorDescriptor<ChildItem>))]
[JsonProperty]
public virtual IList<ChildItem> ChildItems { get; set; }
}
public class ChildItem
{
[Display(Name = "Title", Order = 10)]
public virtual string ItemTitle { get; set; }
[Display(Name = "Link", Order = 30)]
public virtual string ItemLink { get; set; }
//Also tried the below instead of the above string
//[Display(Name = "Child Menu Link", Order = 30)]
//[JsonProperty]
//[JsonConverter(typeof(UrlConverter))]
//public virtual Url ChildItemLink { get; set; }
}
[PropertyDefinitionTypePlugIn]
public class MegaNavigationChildItemProperty : PropertyListBase<MegaNavigationChildItem>
{
// Stubbed
}
So basically a block has a couple of properties one which is a PropertyList, I have used an editor descriptor and don't think I need a backing type as its not a custom object etc.
When I add something to the List, whether its the simple 2 string props or 1 string 1 Url props I get the same following error:
Try changing PropertyListBase to PropertyList, we used to have to do the JSON serialization ourselves but if you have a base class that's doing it I think it can cause issues now.
id="EPiServer.CMS" version="11.15.0"
id="EPiServer.CMS.UI" version="11.25.0"
Currently have the following simple block set up:
So basically a block has a couple of properties one which is a PropertyList, I have used an editor descriptor and don't think I need a backing type as its not a custom object etc.
When I add something to the List, whether its the simple 2 string props or 1 string 1 Url props I get the same following error: