Expand my Community achievements bar.

SOLVED

Change page property value when rollout conent

Avatar

Level 2

Hello,

We have implemented MSM in our project. I would like to know when the content is modified in the parent, one of the page property need to be modified and rollout the content to child.

For example :

Parent page "A" has page property "refPath=/content/myapp/abc/lmn" and when page is rollout to child then the property need to be changed to "refPath=/content/myapp/MOP/KPM". This change should happen in the rollout config. How this can be achieved.

Thanks in Advance

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

Hi Meenakshi

  Above approach is for all properties , where you can directly relate say A (src) needs to be mapped to B(trgt) scenario. But for your requirement , you need to create custom Live Action as I mentioned in the last . Below github code will clearly give you an idea how to write your code to do your requirement

https://github.com/Adobe-Marketing-Cloud/experiencemanager-java-msmrollout/blob/master/MyLiveActionF...

Check lines 92 - 103. Let me know if you need more info

Thanks

Veena

View solution in original post

3 Replies

Avatar

Community Advisor

Hi Meenakshi

      If my understanding is correct , then you want to change a property to another while roll out. This is the basic configuration we do while configuring the custom roll out config. Please read Configuring Live Copy Synchronization - docs.adobe.com  . In this document read "INSTALLED SYNCHRONIZATION ACTIONS" --> editProperties. You can acheive this by below steps

1. Go to http://localhost:4502/miscadmin#/etc/msm/rolloutconfigs

2. Click on New and create a new roll out config

1349403_pastedImage_5.png

3. Open the newly created config page and click on edit in "Settings"

1349404_pastedImage_8.png

4. Under Sync Trigger, select "On Rollout"

1349408_pastedImage_10.png

5. Now go to this node under your CRXDE . /etc/msm/rolloutconfigs/custom-roll-out/jcr:content

6. For your reference ,  Check the custom roll out configuration already available for geometrixx website  /etc/msm/rolloutconfigs/geometrixx-outdoors-mobile/jcr:content/editProperties

1349409_pastedImage_11.png

The editMap property basically defines " which property in parent should be changed from what to what " . That said , let me explain one value set in that node to explain you what we exactly mean here

I have taken first value from that node below

7. Now coming back to where we left in step 5, right click and create a new node under jcr:content

    1349417_pastedImage_24.png

Create the node with below properties

Name : - editProperties  (Please be sure about the spelling. Sling is very much case sensitive)

Type :- cq:LiveSyncAction

8. Add a property "editMap" (String)

If you need to change refPath=/content/myapp/abc/lmn to refPath=/content/myapp/MOP/KPM , then the value should be set as below

refPath#/content/myapp/abc/lmn#/content/myapp/MOP/KPM (or if you can figure out a generic regex , that also will do )

You can add all the properties you need to map like this as comma (,) separated values.

PS:- Please note that this will replace all the child pages refPath to /content/myapp/MOP/KPM , but if you can figure out a generic pattern , add it as a regex to match your requirement.

Please let me know if you need any more information

PS:- The above would help you to fix your issue. But incase you need to create your own liveActions this may help Implement Custom CQ Rollout Action | /home/bkondepudi

Thanks

Veena

Avatar

Level 2

Thanks Veena.

This we have implemented for sling:resourceType property.

Consider a scenario where a URLs field of xtype multifield.

multifield-data.JPG

If new item is added and the value contains a path then the value need to be modified on rollout.

Avatar

Correct answer by
Community Advisor

Hi Meenakshi

  Above approach is for all properties , where you can directly relate say A (src) needs to be mapped to B(trgt) scenario. But for your requirement , you need to create custom Live Action as I mentioned in the last . Below github code will clearly give you an idea how to write your code to do your requirement

https://github.com/Adobe-Marketing-Cloud/experiencemanager-java-msmrollout/blob/master/MyLiveActionF...

Check lines 92 - 103. Let me know if you need more info

Thanks

Veena