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?
Have you looked at writing HTL component and using Sling Models- you should be able to create most types of components and these can easily be added to an editable templates via its policies.
We've created components, we've added them to our authored templates and they are working fine. But when we try to designate the components in the template should be rendered through SDI its not working. When we create a page using those templates the components we drop on the page that are designated as needing SDI are being rendered with the proper server side include tags. So authorble templates are working, sling dynamic includes are working, but we can't get them to work together.
I am not aware of any examples that show both of them working together. Most of the editable templates examples use HTL components - which is really best practice.
I will check internally to see if anyone has used these together.
Talking to some industry community experts - reply was: " some indirection between SDI + Editable Templates when it tries to load the template configuration could be responsible for the issue."
I would log a bug here,
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?
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."
We can't unlock the component as it is the header/ footer for template. These needs to be fixed on template and authors should not be able to change it on individual pages.
I would recommend to test that it works when you unlock the template. If it works, then would you know the rootcause and the solution - it would essentially mean some kind or rep:write/jcr:versionManagement or similar permission issue on template node(s) which must be assigned to the service user used by SDI service. Write custom code to achieve it, if that's feasible.
Alternatively, as Scott mentioned above, open a ticket to SDI to get proper fix.
I'll debug and let you know..
Follow the properties/behavior that change when you unlock the template. That should give you a quick start..
Extra SDI config needed for /conf folder.
* Add extra configuration for /conf folder.
* Add "ModMimeUsePathInfo On" to the VirtualHost in Apache so includes get processed on the first request.
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