Try our conversational search powered by Generative AI!

Property as ContentArea inside PropertyList Item


Hello all,

I have a Block:

public class ExpandableBlock : BlockData
    [Display(Name = "Heading", GroupName = SystemTabNames.Content)]
    public virtual string Heading { get; set; }

    [Display(Name = "Sub-Text", GroupName = SystemTabNames.Content)]
    public virtual string SubText { get; set; }

    [EditorDescriptor(EditorDescriptorType = typeof(CollectionEditorDescriptor<ExpandableBlockItem>))]
    public virtual IList<ExpandableBlockItem> Items { get; set; }

And ExpandableBlockItem Class:

public class ExpandableBlockItem
    [Display(Name = "Button Text")]
    public virtual string ButtonText { get; set; }

    [Display(Name = "Expandable Area")]
    public virtual ContentArea ExpandableContent { get; set; }

    public virtual string Id => Guid.NewGuid().ToString();

Under every ExpandableBlockItem I want to have a ContentArea, so I could put some Block inside.

However it doesn't work and does not allow me to create new block under ExpandableContent property (this is how it renderds - It renders as an area where I can drop some blocks with a text - You can drop content here. - but without a link to Create New Block or Media folder so I could drag some block there.

Thank you in advance, cheers!

Apr 12, 2020 11:00


PropertyList fully support simple properties(string, int, etc..). To allow the complex property you have to write custom code.

More info-

PropertyList<T> together with complex types requires additional custom functionality to fully ensure data consistency, portability and functionality

Apr 13, 2020 8:35
fuji - Apr 13, 2020 8:44
I see, thank you. Will go with some kind of quick workaround for now.
This topic was created over six months ago and has been resolved. If you have a similar question, please create a new topic and refer to this one.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.