Sling Dynamic Include — Deep Dive | Dynamically Include Page Components in AEM

Albin Issac
Tech Learnings
Published in
6 min readAug 29, 2020

--

This tutorial deep dive into Apache Sling Dynamic Include and explains how to use different include types in AEM to dynamically include the page components in AEM.

SDI(Sling Dynamic Include) Introduction

  • In most of the cases, AEM sites contain static data that can be cached in Dispatcher, CDN, or other caching layers.
  • In some cases, small dynamic data makes the entire page not cacheable in Dispatcher or other caching layers, this will increase the overall page loading time and also impact the performance of the publishers as every request reaches to the publisher for rendering.
  • In the above cases, we want to cache almost the whole page in dispatcher and the selected component should be included dynamically.
  • The SDI enables the page to be cached with some placeholder(include) for dynamic data that will be replaced with real content while accessing the page. This enables most parts of the pages to be cached in caching layers and the dynamic data is replaced while accessing the page.

SDI Include Types

Include tags helps to add dynamic data before returning the page to the client, Include tag types available on different layers between the dispatcher and client.

sling-dynamic-include-in-aem

--

--

Albin Issac
Tech Learnings

I work as a Software Architect specializing in Marketing Technologies. For more information, please visit my profile at: https://myprofile.albinsblog.com/