Expand my Community achievements bar.

Issue with sling:resourceSuperType AEM 6.3

Avatar

Level 2

Hi,

We are in process of upgrading from AEM 6.0 to AEM 6.3. We also wanted to use sightly for our existing code base. We are converting the existing templates and components as per sightly.

Templates use sling:resourceSuperType to inherit from page component provided OOB

e.g:

--apps

     --myProject

          --components

               --pages

                    --base-page (sling:resourceSuperType as foundation/components/page)

                         -- body.jsp

                         --head.jsp

                         --content.jsp

                         --headlibs.jsp

                         --navigation.jsp

                    -- inner-page (sling:resourceSuperType as base-page)

                         -- content.jsp

                         -- headlibs.jsp

This is done to inherit common content in new templates created and the changes are specified in jsp files added to the new template.

While creating the page using the 'inner-page' template, content.jsp and headlibs.jsp are loaded from inner-page and rest of the items on the page are loaded from files as placed under the base-page because of sling:resourceSuperType used.

Now AEM 6.3,

1. base-page sling:resourceSuperType changed to wcm/foundation/components/page

2. all the jsp's mentioned above are changed to .html

3. code changes done as per sightly.

Now if we create a page using 'inner-page' template, the page is displayed blank. if we change the filename under /inner-page/content.html to /inner-page/inner-page.html, the page displays the content as per the inner-page.html. But the content from /base-page are not loaded despite using the sling:resourceSuperType as /apps/myProject/components/pages/base-page

What is it that we are doing wrong here in using sling:resourceSuperType?

12 Replies