Changing links into a RTE before print in HTML don't externalize correctly

Avatar

Avatar
Validate 1
Level 2
jonimarrero95
Level 2

Likes

6 likes

Total Posts

8 posts

Correct reply

1 solution
Top badges earned
Validate 1
Boost 5
Boost 3
Boost 1
Affirm 1
View profile

Avatar
Validate 1
Level 2
jonimarrero95
Level 2

Likes

6 likes

Total Posts

8 posts

Correct reply

1 solution
Top badges earned
Validate 1
Boost 5
Boost 3
Boost 1
Affirm 1
View profile
jonimarrero95
Level 2

19-03-2021

Hi guys,

 

I'm changing the text content of RTE saved sending to POJO, catching the links, changing the language for contextualize them and then I print all text assembled to HTML again. This work perfect, the problem is about the links in the publish aren't externalized. I see the /content/project part in the links, I don't understand why, this happend just because I'm sending the text of RTE to a POJO because all links changed or not (some times the link haven't contextualize and they aren't modified) are with the equal problem.

 

Any Idea?

Thanks!

 

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar
Applaud 25
Level 10
asutosh_jena
Level 10

Likes

593 likes

Total Posts

705 posts

Correct reply

207 solutions
Top badges earned
Applaud 25
Give Back 100
Boost 500
Affirm 100
Ignite 1
View profile

Avatar
Applaud 25
Level 10
asutosh_jena
Level 10

Likes

593 likes

Total Posts

705 posts

Correct reply

207 solutions
Top badges earned
Applaud 25
Give Back 100
Boost 500
Affirm 100
Ignite 1
View profile
asutosh_jena
Level 10

19-03-2021

Hi @jonimarrero95 

When you say that the links are not externalized in the publish, do you mean that you are using anykind of URL shortening and expecting the short URL with domain name such as www.abc.com/anything.html in place of /content/abc/en_us/anything.html ? Does it externalize other URLs that you have on the website?


You can call the externalLink method from Externalizer interface and it will externalize the URL.

externalizer.externalLink(resourceResolver, externalizerName, currentPagePath);

 

URL for reference:

https://experienceleague.adobe.com/docs/experience-manager-64/developing/platform/externalizer.html?...

 

Hope this helps!
Thanks!

Answers (0)