Very recently I came to know that I could have IList as a field in a Block. Following is the field I have added.
[EditorDescriptor(EditorDescriptorType = typeof(CollectionEditorDescriptor))]
[Display(
Name = "Section",
Description = "Add sections here",
GroupName = SystemTabNames.Content,
Order = 6)]
public virtual IList Sections { get; set; }
[PropertyDefinitionTypePlugIn]
public class DishPropery : PropertyList
{
protected override MenuSectionBlock ParseItem(string value)
{
return JsonConvert.DeserializeObject(value);
}
public override PropertyData ParseToObject(string value)
{
ParseToSelf(value);
return this;
}
}
With this implementation I am now able to add data but am not able to view the same in Preview/Edit mode unless I publish the block. Is the code missing something?
Hi All,
Very recently I came to know that I could have IList as a field in a Block. Following is the field I have added.
With this implementation I am now able to add data but am not able to view the same in Preview/Edit mode unless I publish the block. Is the code missing something?