Sling resourceType , sling:resourceSuperType. | Community
Skip to main content
Level 9
Oct 16, 2015 2:28 AM UTC
Solved

Sling resourceType , sling:resourceSuperType.

Hi All,

What exactly is the difference between the two.

Any detailed explanation/reference would be helpful.

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
smacdonald2008
smacdonald2008Accepted solution
Level 10
Oct 16, 2015 2:28 AM UTC

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

3 replies

New Participant
Apr 23, 2020 7:48 AM UTC

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.

Translate
Runal_Trivedi
Level 6
Oct 16, 2015 2:28 AM UTC

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

Translate
smacdonald2008
smacdonald2008Accepted solution
Level 10
Oct 16, 2015 2:28 AM UTC

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

Translate