protected override void CreateChildControls() { var dynamicKey = DynamicPlaceholderKeyRepository.Get(Placeholderkey, new ID(UniqueID)); Tracer.Debug("DynamicKeyPlaceholder: Adding dynamic placeholder with Key " + dynamicKey); Placeholder = new Placeholder { Key = dynamicKey }; Controls.Add(Placeholder); Placeholder.Expand(); }
public static HtmlString DynamicPlaceholder(this HtmlHelper helper, string basePlaceholderKey) { return(helper.Sitecore().Placeholder(DynamicPlaceholderKeyRepository.Get(basePlaceholderKey, new ID(RenderingContext.Current.Rendering.UniqueId)))); }