Quantcast
Channel: Using Optimizely Platforms
Viewing all articles
Browse latest Browse all 8020

How to read the block type placed in the ContentArea

$
0
0

I have a block and ContentArea property like below:

public class QuestionnaireBlock : BlockBase
{
[CultureSpecific]
[Display(Name = "Questions Content Area", GroupName = PropertyGroupNames.Content, Order = 10)]
public virtual ContentArea QuestionsContentArea { get; set; }
}

I place a block inside this QuestionsContentArea property as given below:

[CultureSpecific]
[Display(Name = "Question Text", GroupName = PropertyGroupNames.Content, Order = 10)]
public virtual string QuestionText { get; set; }

[CultureSpecific]
[Display(Name = "Items", GroupName = PropertyGroupNames.Content, Order = 20)]
[EditorDescriptor(EditorDescriptorType = typeof(AnswerListPropertyDescriptor))]
[ListItems(4)]
public virtual IList<QuestionnaireAnswerBlock> Answers { get; set; }
}

how do I get the values of the properties of the block placed inside a contentarea in my model of type QuestionnaireBlock in the controller class


Viewing all articles
Browse latest Browse all 8020

Trending Articles