Expand my Community achievements bar.

Submissions are now open for the 2026 Adobe Experience Maker Awards.
SOLVED

How to safely update the sling:configRef property

Avatar

Level 2

Hi Team,

How do you safely update the sling:configRef property of a page template structure in AEM as a Cloud Service, given that direct editing of /conf in Cloud Service is discouraged, and doing it incorrectly can break template-based content inheritance?

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

Hi @OmarKh3,

In Cloud, updating the sling:configRef on a page template (especially when using editable templates) should NOT be done manually via CRXDE or page property dialogs in Cloud environments. Instead, the recommended way is:

1. Define the configRef at the Template-Level Structure Node

This ensures all pages created from that template inherit the configuration cleanly.

Set it under:

/conf/<site>/settings/wcm/templates/<template>/structure/jcr:content

Example:

"sling:configRef" = "/conf/my-site/settings"

Push this via code in the ui.content module, not via in-author changes.

2. Avoid Setting configRef on Root Pages

If you also set it on the actual root page (e.g., /content/my-site), it can override the structure-level inheritance, causing issues with policies, styles, or context-aware configs.

Instead, let it flow from the template structure node.

3. Use Context-Aware Configuration (/conf) Properly
  • Organize per site/language/country: /conf/site-ca, /conf/site-fr, etc.

  • Avoid reusing a single /conf/global across unrelated templates — this leads to maintainability and inheritance conflicts in AEMaaCS.


Santosh Sai

AEM BlogsLinkedIn


View solution in original post

1 Reply

Avatar

Correct answer by
Community Advisor

Hi @OmarKh3,

In Cloud, updating the sling:configRef on a page template (especially when using editable templates) should NOT be done manually via CRXDE or page property dialogs in Cloud environments. Instead, the recommended way is:

1. Define the configRef at the Template-Level Structure Node

This ensures all pages created from that template inherit the configuration cleanly.

Set it under:

/conf/<site>/settings/wcm/templates/<template>/structure/jcr:content

Example:

"sling:configRef" = "/conf/my-site/settings"

Push this via code in the ui.content module, not via in-author changes.

2. Avoid Setting configRef on Root Pages

If you also set it on the actual root page (e.g., /content/my-site), it can override the structure-level inheritance, causing issues with policies, styles, or context-aware configs.

Instead, let it flow from the template structure node.

3. Use Context-Aware Configuration (/conf) Properly
  • Organize per site/language/country: /conf/site-ca, /conf/site-fr, etc.

  • Avoid reusing a single /conf/global across unrelated templates — this leads to maintainability and inheritance conflicts in AEMaaCS.


Santosh Sai

AEM BlogsLinkedIn