Hi,
dynamic loaded control is only loaded. I mean it loads the content from configured editable region. If you save the content on child it will break inheritance, because be default is selected editable content from the current document.
Example:
1. Parent A - has TESTParent in its editable region
2. Child B - has dynamically loaded content from parent's editable region and contains TESTParent as well
3. Now you save the content on Child B with content TestChild. Since now the editable content of child document will contain TestChild, not TESTParent.
Here is the example code which supports above behavior
Parent template:
<asp:Content ID="Content1" ContentPlaceHolderID="plcMain" runat="Server">
<cms:CMSEditableRegion ID="txtRight" runat="server" DialogHeight="400" RegionType="HtmlEditor" RegionTitle="Right" />
</asp:Content>
Child template markup:
<asp:Content ID="Content1" ContentPlaceHolderID="plcMain" runat="Server">
<cms:CMSEditableRegion ID="txtRight" runat="server" DialogHeight="400" RegionType="HtmlEditor" RegionTitle="Right" Enabled="false" /> <%--Content inherited from section landing page--%>
</asp:Content>
Child template code behind:
protected void Page_Load(object sender, EventArgs e)
{
if (CMSContext.CurrentDocumentParent != null)
{
var pageInfo = CMS.PortalEngine.PageInfoProvider.GetPageInfo(CMSContext.CurrentSiteName, CMSContext.CurrentDocumentParent.NodeAliasPath, "en-US", null, true);
txtRight.LoadContent(pageInfo);
}
}
Best regards,
Ivana Tomanickova