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
BedrockMission!

Learn More

View all

Sign in to view all badges

AEM Sightly Absolute path for Client libs

Avatar

Avatar
Validate 1
Level 1
ChristophGMlr
Level 1

Like

1 like

Total Posts

5 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
Boost 1
View profile

Avatar
Validate 1
Level 1
ChristophGMlr
Level 1

Like

1 like

Total Posts

5 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
Boost 1
View profile
ChristophGMlr
Level 1

11-07-2017

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?

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar
Give Back 50
Employee
Feike_Visser1
Employee

Likes

247 likes

Total Posts

970 posts

Correct Reply

221 solutions
Top badges earned
Give Back 50
Give Back 5
Give Back 3
Give Back 25
Give Back 10
View profile

Avatar
Give Back 50
Employee
Feike_Visser1
Employee

Likes

247 likes

Total Posts

970 posts

Correct Reply

221 solutions
Top badges earned
Give Back 50
Give Back 5
Give Back 3
Give Back 25
Give Back 10
View profile
Feike_Visser1
Employee

11-07-2017

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

Answers (2)

Answers (2)

Avatar

Avatar
Boost 1
Level 1
NitinHarikant
Level 1

Likes

2 likes

Total Posts

6 posts

Correct Reply

0 solutions
Top badges earned
Boost 1
View profile

Avatar
Boost 1
Level 1
NitinHarikant
Level 1

Likes

2 likes

Total Posts

6 posts

Correct Reply

0 solutions
Top badges earned
Boost 1
View profile
NitinHarikant
Level 1

11-07-2017

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">

Avatar

Avatar
Validate 1
Level 1
ChristophGMlr
Level 1

Like

1 like

Total Posts

5 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
Boost 1
View profile

Avatar
Validate 1
Level 1
ChristophGMlr
Level 1

Like

1 like

Total Posts

5 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
Boost 1
View profile
ChristophGMlr
Level 1

11-07-2017

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.