Try our conversational search powered by Generative AI!

ContentArea/Block Rendering Tags


I want to render a block different deppending on what Tag that is set on the content area the block resides in.

The tag is set something like

<%= Html.PropertyFor(x => x.TestContentArea, new { Tag = "SomeTag" })%>

But the thing i cant get right is how the controller should look like to pick up the different tags. Anyone got any help on this topic?

Feb 13, 2013 9:54

By using the TemplateDescriptor attribute, you'll be able to specify a tag for your controller.

[TemplateDescriptor(Tags = new[] { "SomeTag" })]


Feb 13, 2013 11:01
This thread is locked and should be used for reference only. Please use the Episerver CMS 7 and earlier versions forum to open new discussions.
* 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.