Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

SOLVED

Sling - Script resolution

Avatar

Level 2

Hi Team, While going through the sling script resolution, i came up with a point where i need some suggestion/clarification.

My URL :

http://localhost:4506/content/ideawebsite.men.abc.html , here selector is 'men.abc'

Node Name : ideapage

Script files under component ideapage are as below :

men.html.jsp

abc.html.jsp

men.abc.html.jsp

ideapage.jsp

On hit of above URL, men.html.jsp renders.

I want to invoke the file 'men.abc.html.jsp'

Can i have a file name like 'men.abc.html.jsp' (seems invalid to me), but if i want a best match with 'men.abc' + 'html' (Selector + Extension) + jsp, what should be the correct file name?

Thanks,

Vipin Kumar

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

Hi,

Yes, the file men.abc.html.jsp is not going to render anything.

if you want a match for men.abc it would be men.html.jsp. But if you really wanna render something based on 2 selectors then you need to create a file abc.html (selector2)inside men (selector1)folder.

e.g.

http://localhost:4502/content/AEM63App/en/products/2.men.abc.html?wcmmode=disabled

Screen Shot 2018-08-08 at 9.54.14 AM.png

Thanks

Arun

View solution in original post

5 Replies

Avatar

Correct answer by
Community Advisor

Hi,

Yes, the file men.abc.html.jsp is not going to render anything.

if you want a match for men.abc it would be men.html.jsp. But if you really wanna render something based on 2 selectors then you need to create a file abc.html (selector2)inside men (selector1)folder.

e.g.

http://localhost:4502/content/AEM63App/en/products/2.men.abc.html?wcmmode=disabled

Screen Shot 2018-08-08 at 9.54.14 AM.png

Thanks

Arun

Avatar

Level 2

Thanks Arun for clarifying the doubt. It works.

Avatar

Level 2

HI ,

Can You please Review my video and Suggest some improvement. Sling Script Resolution - YouTube

Thanks In Advance

Avatar

Level 2

Hi ,

You can watch the video here Sling Script Resolution - YouTube  In which I have tried explaining how to make use to different script and order of their resolution.

Also Please comment your valuable feedback.