ASPX templates
Version 5.x > ASPX templates > Global Editable Region View modes: 
User avatar
Member
Member
hjennerway-mi6 - 11/10/2010 10:53:33 AM
   
Global Editable Region
Is it possible to have an CMSEditableRegion on the masterpage which shows the same content on every page. As it stands, I have an aspx page used as my master page where the regions are defined, and I can edit them from all pages in CMSDesk, but their content is set per page. I need to have the same content in these regions on every page.

User avatar
Kentico Support
Kentico Support
kentico_jurajo - 11/11/2010 2:25:07 AM
   
RE:Global Editable Region
Hi,

You will need to load the content of the parent editable region on the master page to the editable regions on the sub pages. You can take inspiration in the code below:
MainContentText2.LoadContent(CMS.PortalEngine.PageInfoProvider.GetPageInfo(CMSContext.CurrentSiteName, "/", "en-us", null, true, CMS.DataEngine.ConnectionHelper.GetConnection()));

You will need to replace MainContentText2 with real ID of your editable region control.

Best Regards,
Juraj Ondrus