Skip to main content
Jai1122
Level 4
Oct 16, 2015 2:27 AM UTC
Solved

sling include

I have used <sling include path="" /> but what is <sling:include resource="" />?

Can someone help me know the diffrence between them?

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Feike_Visser1
Feike_Visser1Accepted solution
Adobe Employee
Oct 16, 2015 2:27 AM UTC

path comes handy when you want to render resources with selectors path="${somepath}.withselector.html"

2 replies

Feike_Visser1
Adobe Employee
Feike_Visser1Adobe EmployeeAccepted solution
Adobe Employee
Oct 16, 2015 2:27 AM UTC

path comes handy when you want to render resources with selectors path="${somepath}.withselector.html"

Translate
Tim_Donovanuk
Level 2
Oct 16, 2015 2:27 AM UTC

I believe you can use resource= instead of path= if you've already got a reference to a resource using getResource, e.g. 

sling:getResource(resourceResolver,'/content/page')

See http://sling.apache.org/documentation/bundles/sling-scripting-jsp-taglib.html#include

Translate