How to get hardcoded Component links to conform to MSM on rollout? | Community
Skip to main content
Level 2
November 2, 2017
Solved

How to get hardcoded Component links to conform to MSM on rollout?

  • November 2, 2017
  • 2 replies
  • 1215 views

I haven't found a good solution for this and hope someone else has come across this.

I have a navigation component (HTL) where all the links in the component live in the component HTML. Is there a way to get these links to automatically update to their language copy path on rollout?

i.e.

Hardcoded link: /content/site/language-masters/en/products.html

Want link to update to: /content/site/us/en/products.html after rollout.

Any ideas?

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by Deenamo

Not really; When a page that references the HTL component is rolled out, nothing happens to the actual component template. It exists in a single instance.

You can write a custom Sling Rewriter to do that on page render time.

2 replies

kautuk_sahni
Community Manager
Community Manager
November 24, 2017

Moving this question to AEM topic!!

Kautuk Sahni
DeenamoAccepted solution
Level 2
November 25, 2017

Not really; When a page that references the HTL component is rolled out, nothing happens to the actual component template. It exists in a single instance.

You can write a custom Sling Rewriter to do that on page render time.