Expand my Community achievements bar.

SOLVED

How to export a page along with associated assets from one site and then import to other new site

Avatar

Level 1

Hi Guys,

 

Wondering if there is a lead available on exporting a web page from one existing website along with necessary assets and scripts ?

 

For instance i have WKND site tutorial running on my local AEM cloud instance without any issues, what i would like to do is to copy about-us.html page and transfer to another new TEST site, as here

 

Source Page Location

http://localhost:4502/editor.html/content/wknd/us/en/about-us.html

 

Destination Page Location

http://localhost:4502/editor.html/content/TEST/us/en/

 

Please note

 

1. I do have both the sites WKND and TEST up and running well

2. Environment is AEM Cloud local instance

3.  I would like to see templates, experience fragments, css, images and any business logic transferred from WKND to newly created site TEST

4. i have admin permissions on instance and computer

 

Appreciate your help always,

 

Please don't hesitate if you have any questions, happy to answer

 

Thank you.

1 Accepted Solution

Avatar

Correct answer by
Employee Advisor

Hi @malakaamir786!

 

When copying a page from one site to another one, there are a couple of things that need to be evaluated:

  • Content hierarchy: Most pages will have dependencies or be influenced by their respective parent, sibling or child pages. So copying a single page to another site will also change that page with regards to this kind of dependencies. Common dependencies are: navigation, lists or teasers of (parent-/sub-/sibling-) pages but also references from to configurations that are stored in the hierarchy. So based on your use case and the expected outcome, you may need to copy not only a single page but multiple pages or even a part of the content tree.
  • Templating: Does the target site use the same templates as the source page? If not, you will need to check how to handle this situation. You can either allow the source template for the target location or you need to change the template of the page, which may be a bit of a challenge depending on the differences between the two template types.
  • References: When copying a page, references will still point to the same resources as the source page. This applies to assets, tags, templates and components and the like. You will need to decide if you want to copy these elements/hierarchies as well or if you want to keep them as is. If you want separate structures, you need to adjust the references in the copied page as well.

I would suggest to check the following options:

  • Simply copy the page using the UI. This will require the used template to be allowed in the target site hierarchy. Afterwards you need to check if you want to adjust references as well, but this would have to be done manually.
  • If you need to adjust the template, you can try to copy the page using CRX DE. On the repository level, the check for allowed templates is not applied and you can manually change the pages template via CRX DE to use the new one.
  • Maybe a bit over-the-top: use Multi Site Manager to create a live copy. You can use the source page as a blueprint and create a live copy in your target site structure. According to the rollout configuration, references can be adjusted automatically and there will be an active relationship that allows for (manual or automatic) synchronization of the source and the target page/content (unless you cancel the relationship after the initial rollout).

Hope that helps!

View solution in original post

2 Replies

Avatar

Correct answer by
Employee Advisor

Hi @malakaamir786!

 

When copying a page from one site to another one, there are a couple of things that need to be evaluated:

  • Content hierarchy: Most pages will have dependencies or be influenced by their respective parent, sibling or child pages. So copying a single page to another site will also change that page with regards to this kind of dependencies. Common dependencies are: navigation, lists or teasers of (parent-/sub-/sibling-) pages but also references from to configurations that are stored in the hierarchy. So based on your use case and the expected outcome, you may need to copy not only a single page but multiple pages or even a part of the content tree.
  • Templating: Does the target site use the same templates as the source page? If not, you will need to check how to handle this situation. You can either allow the source template for the target location or you need to change the template of the page, which may be a bit of a challenge depending on the differences between the two template types.
  • References: When copying a page, references will still point to the same resources as the source page. This applies to assets, tags, templates and components and the like. You will need to decide if you want to copy these elements/hierarchies as well or if you want to keep them as is. If you want separate structures, you need to adjust the references in the copied page as well.

I would suggest to check the following options:

  • Simply copy the page using the UI. This will require the used template to be allowed in the target site hierarchy. Afterwards you need to check if you want to adjust references as well, but this would have to be done manually.
  • If you need to adjust the template, you can try to copy the page using CRX DE. On the repository level, the check for allowed templates is not applied and you can manually change the pages template via CRX DE to use the new one.
  • Maybe a bit over-the-top: use Multi Site Manager to create a live copy. You can use the source page as a blueprint and create a live copy in your target site structure. According to the rollout configuration, references can be adjusted automatically and there will be an active relationship that allows for (manual or automatic) synchronization of the source and the target page/content (unless you cancel the relationship after the initial rollout).

Hope that helps!

Hi @markus_bulla_adobe, Thank you so much for detailed response, highly appreciated. I will look into provided options and see how it goes. Cheers