I created a composite components control for Web Forms. I accomplished it by overriding the RenderLayout pipeline processor Sitecore.Pipelines.RenderLayout.InsertRenderings. The issue I have is that I want the renderings (sublayouts) editing be disabled. In the pipeline, the Editing property of the rendering item is "read only" at run time.
Does any know of a way to programmatically disable the editing ability of the renderings in my composite placeholder?
public class RenderLayout : RenderLayoutProcessor
{
public override void Process(RenderLayoutArgs args)
{
Assert.ArgumentNotNull(args, "args");
if (Context.Item == null)
{
return;
}
using (new ProfileSection("Insert renderings into page."))
{
InsertRenderingsArgs insertRenderingsArgs = new InsertRenderingsArgs();
CorePipeline.Run("insertRenderings", insertRenderingsArgs);
foreach (RenderingReference current in insertRenderingsArgs.Renderings)
{
current.RenderingItem.Editable = false; <----HERE
Context.Page.AddRendering(current);
}
}
}
}