Search code examples
aemsling

How is the script resolved by Sling when we have two selectors?


Say I am having the following directory structure:

  • listcomponent
    • listcomponent.jsp
    • renditions
      • overview.jsp
      • full.overview.jsp

The page myPage includes the list component. When accessing a URL like http://localhost:4502/content/mysite/mypage.renditions.overview.html, the overview.jsp script is used. However, for http://localhost:4502/content/mysite/mypage.renditions.full.overview.html, the listcomponent.jsp script is used.

I'd like full.overview.jsp to be loaded in this case. What am I doing wrong?


Solution

  • In that case your overview.jsp should be full folder as below :

    • listcomponent

      • listcomponent.jsp
      • renditions

        • overview.jsp

        • full

          • overview.jsp

    Here is similar answer post. Sling Resolution script calling order

    Hope this will help.