Try our conversational search powered by Generative AI!

exclude specific block on the contentarea when rendering


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?

Name = "Response",
GroupName = SystemTabNames.Content,
Order = 30)]
[AllowedTypes(new[] { typeof(Block2), typeof(Block1) })]
public virtual ContentArea ResponseContentArea { get; set; }

@Html.PropertyFor(m => m.CurrentPage.ResponseContentArea)

Oct 13, 2016 12:44

One option would be to implement a custom contentarea renderer as per the following blog post:

Otherwise you can always get the items in the contentarea by using the Contents property (ContentArea.Contents):

Oct 13, 2016 12:51

How about using tags to render, and only have a renderer for the tag for one of the block types?

Oct 15, 2016 14:21
* 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.