Sling Dynamic Includes and authored templates | Community
Skip to main content
Level 2
June 27, 2018

Sling Dynamic Includes and authored templates

  • June 27, 2018
  • 3 replies
  • 6729 views

We're trying to set up SDI on pages that use authored templates on 6.3 but aren't having any luck.  We have a user widget in the header that uses dynamic data but we aren't seeing anything happen in page rendering when we flag the header component as being an SDI resource type.  We are seeing includes being properly written when we indicate a component in the authored section of a page using that template, so we know SDI is set up properly.  Is there anything that needs to be done to get the two features working together?

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.

3 replies

smacdonald2008
Level 10
June 27, 2018
Level 2
June 27, 2018

Yes, I meant editable templates

arunpatidar
Community Advisor
Community Advisor
June 27, 2018
Arun Patidar
Level 2
June 29, 2018

Just an update, we've found that SDI works if the template component is unlocked, but not when it's locked.

Level 4
January 28, 2019

I am also facing issue with locked component in editable template. Setting SDI on it is not working. I even tried an osgi configuration for template path with resource type of the locked resource. Do we have any solution for this issue?

Thanks,
Rajeev

Gaurav-Behl
Level 10
January 28, 2019

Did you try above mentioned solution by Ben - "Just an update, we've found that SDI works if the template component is unlocked, but not when it's locked."

Level 4
March 5, 2019

Cause

Extra SDI config needed for /conf folder.

Solution

* Add extra configuration for /conf folder.

* Add "ModMimeUsePathInfo On" to the VirtualHost in Apache so includes get processed on the first request.

June 19, 2019

I am using locked/structure component using editable template.

As I have used SDI on above component which uses 'currentPage' object in sling model to retrieve a custom page property. I've noticed that inject of 'currentPage' object in my sling models points to the the structure component page node while hitting via dispatcher. This injects the actual current page while hitting the page on publish instance. I guess this is since sdi is making a separate request from the original request.

Any pointers on retrieving the page property using the above configuration is much appreciated

Best Regards

Paul John

December 1, 2021

@paulj26867979 faced with the same issue. Any luck resolving it?