Sling resourceType , sling:resourceSuperType.

Avatar

Avatar
Give Back 25
Level 5
askdctm
Level 5

Likes

48 likes

Total Posts

476 posts

Correct reply

7 solutions
Top badges earned
Give Back 25
Give Back 10
Give Back 5
Give Back 3
Give Back
View profile

Avatar
Give Back 25
Level 5
askdctm
Level 5

Likes

48 likes

Total Posts

476 posts

Correct reply

7 solutions
Top badges earned
Give Back 25
Give Back 10
Give Back 5
Give Back 3
Give Back
View profile
askdctm
Level 5

15-10-2015

Hi All,

What exactly is the difference between the two.

Any detailed explanation/reference would be helpful.

desktop_exl_promo_600x100_weknowyou.png

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar
Validate 25
Level 10
smacdonald2008
Level 10

Likes

1,409 likes

Total Posts

12,671 posts

Correct reply

2,278 solutions
Top badges earned
Validate 25
Validate 10
Validate 1
Give back 900
Give back 600
View profile

Avatar
Validate 25
Level 10
smacdonald2008
Level 10

Likes

1,409 likes

Total Posts

12,671 posts

Correct reply

2,278 solutions
Top badges earned
Validate 25
Validate 10
Validate 1
Give back 900
Give back 600
View profile
smacdonald2008
Level 10

15-10-2015

From the AEM docs (http://wem.help.adobe.com/enterprise/en_US/10-0/wem/developing/the_basics.html)

In addition to the resource types (primarily defined by the sling:resourceType property) there is also the resource super type. This is generally indicated by the sling:resourceSuperType property. These super types are also considered when trying to find a script. The advantage of resource super types is that they may form a hierarchy of resources where the default resource type sling/servlet/default (used by the default servlets) is effectively the root.

Also - see the SLing docs. This is a good topic to start with:

https://sling.apache.org/documentation/the-sling-engine/url-to-script-resolution.html

Answers (2)

Answers (2)

Avatar

Avatar
Level 1
bsuryakanth
Level 1

Likes

0 likes

Total Posts

1 post

Correct reply

0 solutions
View profile

Avatar
Level 1
bsuryakanth
Level 1

Likes

0 likes

Total Posts

1 post

Correct reply

0 solutions
View profile
bsuryakanth
Level 1

23-04-2020

sling:resourceType: Locate the resource to be used for rendering.

sling:resourceSuperType: Locate the resource to be inherited, allowing us to override some of the scripts.

Avatar

Avatar
Validate 1
MVP
Runal_Trivedi
MVP

Likes

46 likes

Total Posts

153 posts

Correct reply

68 solutions
Top badges earned
Validate 1
Ignite 1
Give Back 5
Give Back 3
Give Back 10
View profile

Avatar
Validate 1
MVP
Runal_Trivedi
MVP

Likes

46 likes

Total Posts

153 posts

Correct reply

68 solutions
Top badges earned
Validate 1
Ignite 1
Give Back 5
Give Back 3
Give Back 10
View profile
Runal_Trivedi
MVP

15-10-2015

You can see an example of sling:resourceType and sling:resourceSuperType in geometrixx too.

  • Simply open geometrixx contentpage component at - /apps/geometrixx/components/contentpage
  • contentpage component node declares sling:resourceSuperType as geometrixx/components/page and the script that it contains is content.jsp
    • What happens here is all the scripts are referred from geometrixx/components/page except content.jsp
    • content.jsp is referred from /apps/geometrixx/components/contentpage

Thats how sling:resourceType ans sling:resourceSuperType relate to each other.

- Runal