Try our conversational search powered by Generative AI!

ContentArea/Block Rendering Tags

Vote:
 

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?

#65875
Feb 13, 2013 9:54
Vote:
 

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

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

    

#65877
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.