Sightly issue with URLs if it doesn't have .html extension

Avatar

Avatar

RMGJID

Avatar

RMGJID

RMGJID

13-09-2016

Hello everyone,

I have a URL for example "http://help-forums.adobe.com/content/adobeforums:test/" when I provide this URL in href, the output that i get is "http://help-forums.adobe.com/content/_adobeforums_test/". 

More Details:

Suppose properties.link = http://help-forums.adobe.com/content/adobeforums:test/

<a href="${properties.link @ context='unsafe'}">Support </a> //this doesn't work

but if i append .html at the end of the URL it works.

<a href="${properties.link @ context='unsafe'}.html">Support </a> //this works

Why doesn't it work when we don't have .html in the URL?

Replies

Avatar

Avatar

Feike_Visser1

Employee

Avatar

Feike_Visser1

Employee

Feike_Visser1
Employee

13-09-2016

This is Sling related, with the extension you basically point how you want to render the content.

Avatar

Avatar

kautuk_sahni

Community Manager

Total Posts

5.8K

Likes

1.0K

Correct Reply

1.1K

Avatar

kautuk_sahni

Community Manager

Total Posts

5.8K

Likes

1.0K

Correct Reply

1.1K
kautuk_sahni
Community Manager

13-09-2016

As correctly pointed by Feike, 

This is sling resolution, please have a look at this URL to Script Resolution documentation :-

Link:- https://docs.adobe.com/docs/en/aem/6-2/develop/the-basics.html

[img]https://docs.adobe.com/content/docs/en/aem/6-2/develop/the-basics/_jcr_content/contentbody/image_1.i...

 

Preference order is Selector + Extention > Selector > Extention > Method of call (get,post etc).

~kautuk

Avatar

Avatar

Jörg_Hoh

Employee

Total Posts

3.0K

Likes

991

Correct Reply

1.0K

Avatar

Jörg_Hoh

Employee

Total Posts

3.0K

Likes

991

Correct Reply

1.0K
Jörg_Hoh
Employee

14-09-2016

Hi,

if the question about the ":" character: This character is special and if it's encountered the namespace mangling of Sling kicks in and translates it into "_namespace_".