I have a site with multiple layouts on a single page template. This is actually for a mobile version on the site. I want to set the default text of an editable region ["editabletext2"] in the mobile layout, to the text found in the editable region ["editabletext1"] in the desktop layout. I read this forum post: http://devnet.kentico.com/questions/how-do-i-render-the-content-of-the-editable-region-of-another-document-using-a-macro which mentions using this macro: CMSContext.CurrentPageInfo.EditableItems["editabletext1"];
So I tried inserting this macro in the "Default Text" field of the ["editabletext2"] webpart and made sure there wasn't any content in this webpart that'll override the default text. But nothing showed when I preview the page. Is there a way I could fetch the content of an editable region on a page template and insert as the default text of another editable region on the same page template but in a different layout?
It may be a visibility issue, if that other webpart or zone isn't available then it may not find the item to gather the text from. Have you tried turning on Debug to see what the macro is doing or returns?
@BRENDEN KEHREN Thank you.. I thought as much.. The webpart I want to inherit from, although on the same page template, is in a layout(desktop layout) that is not visible when the mobile layout is visible. Does this also mean there's no work around?
Do both layouts have web part zones with the same ID?
If they have different IDs, the web parts are not shared.
@YEHUDA LANDO... It's not "possible" to have web part zones with the same ID even if they're in different layouts. I tried and I got a "Web part with given ID already exists." error message. But then are you saying there is a way to share/access contents of a web part in a different layout but on the same page template?
Web part with given ID already exists.
Please, sign in to be able to submit a new answer.