Expand my Community achievements bar.

SOLVED

Rewrite Reference Links Inside Experience Fragments

Avatar

Level 3

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-o...

 

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

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

@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

View solution in original post

4 Replies

Avatar

Correct answer by
Community Advisor

@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

Avatar

Community Advisor

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

Avatar

Administrator

@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