Expand my Community achievements bar.

Get all components of old page - using mapper configs update the components properties in new page

Avatar

Level 7

I have one Old page which was created on Aem6.0 or something. I want to extract the properties of old component like asset url, decription, and all. And update in new component

 

Approach:

1.) Workflow will hit the old page(5-10 pages) and extract the detail,

2.) Launch will triggered on referring new Page,

3.) The extracted details need to be updated in the launch Page.

4.) Using loop will do for each and every page.

 

How can I achieve step 1,2,3 or any other optimal step

3 Replies

Avatar

Community Advisor

Hi @Ronnie09 

 

Can you try accessing the page content with infinity.json?

http://localhost:4502/content/we-retail/language-masters/en/jcr:content.infinity.json

 

This will give you the complete JSON structure with all content details for your component and you can read these value and use it as necessary.


Thanks!

Avatar

Level 7

Hi @Asutosh_Jena_ 

old_component:new_component

example

/content/example/old_component: /content/example/new_component

/conent/example/old_component/resource: xyz

/content/example/new_component/resource: PQR

I got data as key value pair now should I update the mapping

componentsFound.forEach((k, v) -> LOG.info("key : {} , value : {}",k,v)); 

 

 

Now how should I update the old component

Avatar

Community Advisor

Hi @Ronnie09,

Is it possible for you to share the

  • exact old page and new page structure as is in the repo
  • content details from old that we are trying to extract. Example : Is it a single component. If yes, is it the same resourceType for all the 5-10 old pages.