コミュニティアチーブメントバーを展開する。

Submissions are now open for the 2026 Adobe Experience Maker Awards.

Mark Solution

この会話は、活動がないためロックされています。新しい投稿を作成してください。

解決済み

Question on Selectors

Avatar

Level 1

In the CQ 5.5 component developer exam sample questions here http://training.adobe.com/certification/exams/cq-5.5-component-developer.html there is on

Given the following selector: print.a4 and the URL extension is html, which script will Sling render?
A. print.html.jsp
B. a4.html.jsp
C. print.a4.jsp
D. a4.jsp

Correct Answer: A

A similar question here http://dev.day.com/docs/v5_1/html-resources/cq5_guide_developer/ch02s08.html 

For example, consider a request to access the resource /content/corporate/jobs/developer.print.a4.html of type sling:resourceType="hr/jobs".

And the script selection order is

jobs.print.a4.esp
jobs.print.html.esp

which one is correct?

1 受け入れられたソリューション

Avatar

正解者
Level 8

The first example is the correct one, the second example is from version 5.1 and so is old and doesn't account for the latest updates to sling. Refer to these URLs for the latest Sling Script resolution logic:

I think the key point to remember is that if you want support multiple selectors driving script resolution you have to use sub-directories (print/a4.jsp) to have the second selector influence the script resolution. 

元の投稿で解決策を見る

1 返信

Avatar

正解者
Level 8

The first example is the correct one, the second example is from version 5.1 and so is old and doesn't account for the latest updates to sling. Refer to these URLs for the latest Sling Script resolution logic:

I think the key point to remember is that if you want support multiple selectors driving script resolution you have to use sub-directories (print/a4.jsp) to have the second selector influence the script resolution.