In our Composer Layout blocks we've noticed that Extension:ExtensionContentArea renders an empty DIV as its end-tag:
<!-- Start Composer Layout block -->
<!-- Start Composer Content block -->
Content goes here
<!-- End Composer Content block -->
<!-- End Composer Layout block -->
Has anyone else experienced this, and if so, how can it be avoided?
I've also experienced this but I'm sorry to say that i don't know any solution for it. I am also looking for a solution so if you managed to find anything let me know.
The solution we came up with (or rather "quick-fix") was to use jQuery to remove the empty DIV-tag.
I think I've found both the solution and the cause...
It's possibly being caused by the holder panel in the ExtensionContentArea control rendering when in non-edit mode. This could be resolved by EPiServer using a PlaceHolder instead of a Panel.
To fix it, you can attach the following pre-render handler to your ExtensionContentArea's which will hide the holder panel in non-edit mode.
private static Lazy HolderGetter = new Lazy(() =>
var type = typeof(ExtensionContentArea);
var field = type.GetMember("_holder", MemberTypes.Field, BindingFlags.DeclaredOnly | BindingFlags.NonPublic | BindingFlags.Instance).FirstOrDefault() as FieldInfo;
internal static void ExtensionArea_PreRender(object sender, EventArgs e)
var extensionArea = sender as ExtensionContentArea;
if (extensionArea != null && HolderGetter.Value != null)
var holder = HolderGetter.Value.GetValue(extensionArea) as Control;
if (holder != null && extensionArea.Holder != holder)
holder.Visible = false;
If you're particularly tricky, you may be able to attach it to your page's ExtensionPageHandler's LoadContentArea event to make sure you get your pre-render handler onto them all...