Sling Dynamic Include on AEM Cloud | Community
Skip to main content
Level 2
April 28, 2025
Solved

Sling Dynamic Include on AEM Cloud

  • April 28, 2025
  • 1 reply
  • 917 views

I embedded SDI in my AEM Cloud project like this - I added the dependency:

<dependency> <groupId>com.adobe.acs</groupId> <artifactId>acs-aem-commons-bundle</artifactId> <version>6.0.10</version> </dependency>

Then in my component's HTL, I wrapped the dynamic part with:

<sling:include path="dynamicSection.html" resourceType="my/project/components/dynamicsection" />

and I also configured the SDI servlet mapping under /libs/sling/servlet/default.

But when I load the page, it doesn't seem like SDI is actually working - everything is just loading normally without any include tags.

Am I missing something? Appreciate your help! 

@arunpatidar @konstantyn_diachenko @aanchal-sikka @santoshsai 

Best answer by SantoshSai

@aryaba1 Given these constraints,I have used alternative approaches for dynamic content rendering: For Client-Side Rendering: I've used JavaScript to fetch and render dynamic content on the client side and AJAX Calls to make asynchronous calls to fetch dynamic content as needed.

1 reply

SantoshSai
Community Advisor
Community Advisor
April 28, 2025

Hi @aryaba1,

I've encountered the same issue in the past when attempting to use ACS Commons SDI - it  does not fully worked in AEM as a Cloud Service because in AEMaaCS, you don’t have direct Dispatcher module access the way you do in on-premise AEM.
AEM Cloud handles a lot of caching and request routing differently (mostly through CDN and Adobe-managed Dispatcher configs), and Server-Side Includes (SSI) are not enabled by default or even fully supported.

That’s why you’re not seeing SDI in action.

In short:

  • In AEMaaCS, SDI/SSI approaches are not officially supported.

  • Instead, Adobe recommends using Client-Side Includes (JS-based dynamic content loading) or AJAX calls for dynamic parts.

For more information on ACS AEM Commons and its compatibility with AEMaaCS, you can refer to the official documentation: adobe-consulting-services.github.io

Hope that helps!

Santosh Sai
AryaBa1Author
Level 2
April 28, 2025

@santoshsai How did you resolved it? I appreciate if your help.

SantoshSai
Community Advisor
SantoshSaiCommunity AdvisorAccepted solution
Community Advisor
April 28, 2025

@aryaba1 Given these constraints,I have used alternative approaches for dynamic content rendering: For Client-Side Rendering: I've used JavaScript to fetch and render dynamic content on the client side and AJAX Calls to make asynchronous calls to fetch dynamic content as needed.

Santosh Sai