AEM Sightly Absolute path for Client libs | Community
Skip to main content
Level 2
Jul 11, 2017 1:30 PM UTC
Solved

AEM Sightly Absolute path for Client libs

So this is a newbie question I'm sure... But I have the following code:

<sly data-sly-call="${clientLib.css @ categories='ceportal'}"></sly>

Which is rendered as :

<link rel="stylesheet" href="https://forums.adobe.com/etc/designs/ceportal/clientlibs.css" type="text/css">

I need it to be rendered as:

<link rel="stylesheet" href="Https://Some.Url.Com/etc/designs/ceportal/clientlibs.css" type="text/css">

Any advice experts?

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Feike_Visser1
Feike_Visser1Accepted solution
Employee
Jul 11, 2017 3:12 PM UTC

The Sightly/HTL clientlibs will always output a relative path. With rewriters you can output different urls.

3 replies

Feike_Visser1
Feike_Visser1Accepted solution
Employee
Jul 11, 2017 3:12 PM UTC

The Sightly/HTL clientlibs will always output a relative path. With rewriters you can output different urls.

Translate
Level 2
Jul 11, 2017 1:47 PM UTC

So it's not a different domain, the problem is this page in particular is read via another URL so when it is read on another domain the styles get lost.

Translate
Level 2
Jul 11, 2017 1:41 PM UTC

Assuming Https://Some.Url.Com is of different domain, you can directly add the following line in you sightly code.

<link rel="stylesheet" href="Https://Some.Url.Com/etc/designs/ceportal/clientlibs.css" type="text/css">

Translate