I have a repeater in one of the sublayers in Sitecore 6.6. rev 120918. Inside this repeater, I have a placeholder. In ItemDataBoundI assign a key with a GUID to it and using the Nick Wesselman pipeline GetAllowedRendering, I can display the insertion options for this.
The repeater code is very simple:
<asp:Repeater runat="server" ID="rptrTimelineItemsEdit" OnItemDataBound="rptrTimelineItemsEdit_OnItemDataBound">
<ItemTemplate>
<sc:Placeholder ID="scTimelineItemPlaceholder" Key="timelineitemcontent" runat="server" />
</ItemTemplate>
</asp:Repeater>
Limiting element data is also quite simple:
protected void rptrTimelineItemsEdit_OnItemDataBound(object sender, RepeaterItemEventArgs e)
{
if (e.Item.ItemType == ListItemType.Item || e.Item.ItemType == ListItemType.AlternatingItem)
{
Item item = (Item)e.Item.DataItem;
Placeholder scTimelineItemPlaceholder = (Placeholder)e.Item.FindControl("scTimelineItemPlaceholder");
scTimelineItemPlaceholder.Key = "timelineitemcontent" + item.ID.ToString().ToLower();
}
}
Everything works up to this point. After I select the subtitle that I want to insert in the placeholder, it throws me into the JS error popup. After checking in the chrome inspector, I see an error:
Could not find the rendering in the HTML loaded from server PlaceholderChromeType.js:601
Sitecore.PageModes.ChromeTypes.Placeholder.Sitecore.PageModes.ChromeTypes.ChromeType.extend._frameLoaded
So - it would seem that in page reloading, sublayer representations occur before the relay is bound, so it cannot find the placeholder key.
google , layoutpageevent:
. . !