AI OnAI Off
One option would be to implement a custom contentarea renderer as per the following blog post: http://joelabrahamsson.com/custom-rendering-of-content-areas/
Otherwise you can always get the items in the contentarea by using the Contents property (ContentArea.Contents): http://world.episerver.com/documentation/class-library/?documentId=cms/7/ab3bbfb1-5fdd-6650-3ebf-5e59f8f98490
How about using tags to render, and only have a renderer for the tag for one of the block types?
The content area property allows two types of blocks. One of the block has got icon in it's partial view.
When I render the content area property in the following way, I am missing that icon on the block.
Is there anyway to exclude the block type in the contentarea when rendered on the view so that I can render the block type with icon separately as a partial view?
Model:
[CultureSpecific]
[Display(
Name = "Response",
GroupName = SystemTabNames.Content,
Order = 30)]
[AllowedTypes(new[] { typeof(Block2), typeof(Block1) })]
public virtual ContentArea ResponseContentArea { get; set; }
View:
@Html.PropertyFor(m => m.CurrentPage.ResponseContentArea)