Rewrite Reference Links Inside Experience Fragments | Community
Skip to main content
Level 3
November 24, 2023
Solved

Rewrite Reference Links Inside Experience Fragments

  • November 24, 2023
  • 4 replies
  • 1107 views

Hi,

Have you ever experienced this problem? Whenever you create a live copy/roll-out a master page, all the reference links inside a page get updated to the live copy equivalent links automatically; however, this is applicable only for the links which are stored inside a component property or page property in a page. If there are links referenced in editable template structure content or inside an experience fragment, which is used in a master page, it won’t be updated to the live copy equivalent link on roll-out. This is because these are shared or global content, which will be stored in one location (“/conf” or “/content/experience-fragments”).

 

We found a Solution for this problem here in the below link, but couldn't able to proceed clearly, can anyone please explain step by step or help us understand this clearly, so that we will try to implement the same and make it work for any Experience fragment which we gonna create even in future.

https://blog.developer.adobe.com/msm-live-copy-rewrite-reference-links-inside-experience-fragments-or-template-structure-content-ade35f4e93c6

 

what exactly is happening when we use this code? After implementing, how exactly we need to do to test the reference links changed. please help us. Thanks in Advance.!

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 aanchal-sikka

@aj_9625932 

 

You might also want to check https://bimmisoi.blogspot.com/2021/07/update-link-reference-inside-experience.html Here the links are rewritten via a custom Rollout config. 

 

The link which you have shared uses Link Transformers. Link transformer allow us to transform link on page load. To understand Link transformers, please refer to https://medium.com/@toimrank/link-checker-and-transformer-381d4f245d12

 

I would prefer rollout over transformers, since rollout transforms URL during rollout. If needed, authors can break inheritance and update references as well.

4 replies

aanchal-sikka
Community Advisor
aanchal-sikkaCommunity AdvisorAccepted solution
Community Advisor
November 24, 2023

@aj_9625932 

 

You might also want to check https://bimmisoi.blogspot.com/2021/07/update-link-reference-inside-experience.html Here the links are rewritten via a custom Rollout config. 

 

The link which you have shared uses Link Transformers. Link transformer allow us to transform link on page load. To understand Link transformers, please refer to https://medium.com/@toimrank/link-checker-and-transformer-381d4f245d12

 

I would prefer rollout over transformers, since rollout transforms URL during rollout. If needed, authors can break inheritance and update references as well.

Aanchal Sikka
arunpatidar
Community Advisor
Community Advisor
November 27, 2023
Harwinder-singh
Community Advisor
Community Advisor
November 27, 2023

@aj_9625932  You need to create a custom rollout config to update the link references inside experience fragments.

kautuk_sahni
Community Manager
Community Manager
November 28, 2023

@aj_9625932 

Did you find the suggestions from users helpful? Please let us know if more information is required. Otherwise, please mark the answer as correct for posterity. If you have found out solution yourself, please share it with the community.

Kautuk Sahni