Tag: ContentArea

Empty ContentArea, avoid null

ContentArea when empty (no blocks dragged) returns null in code. It’s fine when you use EPiServer standard code for handling ContentArea rendering: When it breaks But the problem exists when you try to touch it from code or Extensions as a solutions I use… Continue Reading „Empty ContentArea, avoid null”

Custom ContentArea without wrapper tags

The default ContentArea rendering will generate something similar to: This is completly fine in most cases, but sometimes you have markup that you need total control of rendering. No wrapping tags I had such a situation. I used it for a slider, where you… Continue Reading „Custom ContentArea without wrapper tags”

Unordered list by ContentArea

Fast example how to make ContentArea rendered as unordered list from blocks in EpiServer 7 MVC. Starting markup: That is very easy to achieve using CustomTag, CssClass, ChildrenCustomTagName, ChildrenCssClass: Block markup: Like you can guess, resulting markup is the same.