활동이 없어 이 대화는 잠겼습니다. 새 게시물을 작성해 주세요.
활동이 없어 이 대화는 잠겼습니다. 새 게시물을 작성해 주세요.
${ link @ extension = 'html' } if link is https://www.google.com/resources then the output is https://www.google.com/resources.html. This is not the expected behavior according to the documentation. Any help is appreciated. Thanks, Nikunj Jariwala
해결되었습니다! 솔루션으로 이동.
조회 수
답글
좋아요 수
If you want to remove the extension, you can use something like below:
${'https://www.google.com/resources' @ extension}
조회 수
답글
좋아요 수
As per my understanding and the sly documentation at [1], @Extension will add the extension to the path. So, this is working as expected.
URL manipulation
<a href="${item.path @ extension = 'html'}">${item.name}</a>
<a href="${item.path @ extension = 'html', selectors='products'}">${item.name}</a>
I tried the following on my side:
${'https://www.google.com/resources' @ extension='html'}
The output is below:
조회 수
답글
좋아요 수
https://docs.adobe.com/content/help/en/experience-manager-htl/using/htl/block-statements.html#sly-el... The documentation on this page says "The @Extension works in all scenarios in AEM 6.3, before you could have a result like www.adobe.com.html and also checks whether to add or not add the extension." The use case is that we dont want to add html to external links. Is that something which cannot be solved using @ extension?
조회 수
답글
좋아요 수
If you want to remove the extension, you can use something like below:
${'https://www.google.com/resources' @ extension}
조회 수
답글
좋아요 수
I do not think that HTL has such functionality to distinguish internal/external links. You will need to write something custom to handle case a use case. Take a look at this [1] to help you in creating this customization.
조회 수
답글
좋아요 수