Get all components of old page - using mapper configs update the components properties in new page | Community
Skip to main content
Level 6
September 15, 2021
Question

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

  • September 15, 2021
  • 2 replies
  • 862 views

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

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

2 replies

Asutosh_Jena_
Community Advisor
Community Advisor
September 15, 2021

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!

Ronnie09Author
Level 6
September 15, 2021

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

Vijayalakshmi_S
Level 10
September 15, 2021

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.