Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn more

View all

Sign in to view all badges

SOLVED

Is SDI possible on head of HTML

subhrom4264858
Level 1
Level 1

Is is possible to dynamically include a component (using SDI) such that it gets rendered on head section of HTML? Does that cause any error, details on any such use case which anyone tried before will be of great help.

sling dynamic include
1 Accepted Solution
antoniom5495929
Correct answer by
Level 7
Level 7

Hi,

no, there's no issue by using SDI even if you apply it into an element which is located into the head.

Since SDI is just a way to skip the cache and make the build of the HTML at Apache level, if you apply an SDI  the browser should receive the HTML as you will create it by you AEM directly. It's for this reason that you will not find issues into the usage of it.

Anyway, if you want to use it (as probably I think) in order to avoid the cache of a "menu" component, I can confirm you that I already applied it in this way without any kind of issues.

 

Thanks,
Antonio

View solution in original post

3 Replies
raghavc
Level 5
Level 5

Yes, it is possible to include a component using SDI inside the head section of the HTML.

antoniom5495929
Correct answer by
Level 7
Level 7

Hi,

no, there's no issue by using SDI even if you apply it into an element which is located into the head.

Since SDI is just a way to skip the cache and make the build of the HTML at Apache level, if you apply an SDI  the browser should receive the HTML as you will create it by you AEM directly. It's for this reason that you will not find issues into the usage of it.

Anyway, if you want to use it (as probably I think) in order to avoid the cache of a "menu" component, I can confirm you that I already applied it in this way without any kind of issues.

 

Thanks,
Antonio

View solution in original post