Five New Optimizely Certifications are Here! Validate your expertise and advance your career with our latest certification exams. Click here to find out more
AI OnAI Off
Five New Optimizely Certifications are Here! Validate your expertise and advance your career with our latest certification exams. Click here to find out more
I think it has something to do with http://world.episerver.com/Blogs/Per-Magne-Skuseth/Dates/2013/8/Letting-your-blocks-know-where-they-are/ :)
I would suggest that you use a Tag where you decide to render your ContentArea, would that work for you?
I agree with Alf, it sounds like you should use tags and template descriptors to solve this. You could take a look at TeaserBlock / TeaserBlockWide in the Alloy templates. You can bind a template to a tag either by registrating it at startup (take a look at TemplateCoordinator.cs in the Alloy project), or use a template descriptor: http://world.episerver.com/Documentation/Items/Developers-Guide/EPiServer-CMS/7/Content/Pages-and-Blocks/How-To/Selecting-a-Template-Based-on-Tag/
Hi,
I want to be able to change the way a block is rendered depending on what ContentArea I put it in. It would be really cool to change the cshtml file I am using for different ContentAreas. I think something similar is present in the Alloy site but I am not sure. Can anyone tell me if this is possible and how?
I am using MVC4 with Razor, EPiServer 7.5 and .NET 4.5
Thank you very much!