A critical vulnerability was discovered in React Server Components (Next.js). Our systems remain protected but we advise to update packages to newest version. Learn More.
AI OnAI Off
A critical vulnerability was discovered in React Server Components (Next.js). Our systems remain protected but we advise to update packages to newest version. Learn More.
Hi,
Looks like you have your custom ContentAreaRenderer. Default ContentAreaRenderer don't add classes.
AlloyContentAreaRenderer from AlloyMVC generate html as your example.
To get rid of wrapping `div` element you can use following code:
@Html.PropertyFor (m => m.BannerContentArea, new { "hascontainer" = false })
Or actually you can rely on some built-in constants as well:
RenderSettings.HasContainerElement
I ended up creating a custom Content Area renderer http://wrzyciel.pl/force-episerver7-to-not-add-empty-divs-for-contentareas/
We're using EPiServer CMS 8.0 and using MVC. I noticed that EPiServer generates wrapping divs in Content Area including the blocks:
I really don't mind the extra divs but what I want to get rid of is the CSS in block's wrapping divs. I tried the following code:
@Html.PropertyFor(m => m.BannerContentArea, new { ChildrenCssClass = "" })
but it doesn't work.