Export content from all AEM pages | Community
Skip to main content
New Member
April 20, 2022
Solved

Export content from all AEM pages

  • April 20, 2022
  • 2 replies
  • 1660 views

Hello, I'm looking for a way to review all content and pages on our AEM site, in order to identify/update pages with outdated content. I have a couple of questions:

1) Is there a way to export content from all AEM pages into a Word document and still retain the images, styling, etc? 

2) How can I sort the pages based on "date last updated"? That will help me prioritize which pages to review first.

 

 

 

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

1.How can I sort the pages based on "date last updated"? That will help me prioritize which pages to review first.

 

In sites.html go to list view for sorting . 

 

Also to compare the page you can use ACS commons package /acs-commons/content/page-compare.html

 

 

Hope it helps.

 

2 replies

SantoshSai
Community Advisor
Community Advisor
April 20, 2022

Dear @cindychenjmh 

1. As per my understanding there is no such Out-of-the-box functionality available in AEM, you have to develop custom OSGI services or component, one way to achieve using Apache POI library.
Apache POI library helps you to deal with MS-Word documents
eg.

import java.io.File;
import java.io.FileOutputStream;
import org.apache.poi.xwpf.usermodel.XWPFDocument;

public class CreateDocument {
   public static void main(String[] args)throws Exception  {
      //Blank Document
      XWPFDocument document = new XWPFDocument(); 
		
      //Write the Document in file system
      FileOutputStream out = new FileOutputStream( new File("createdocument.docx"));
      document.write(out);
      out.close();
      System.out.println("createdocument.docx written successully");
   }
}

for more information - Apache POI example

2. You may use in built Query tool or implement custom component to generate report with such pages. for more information take a look at - Query Builder API

Hope this helps you!

Regards,

Santosh

Santosh Sai
Himanshu_Jain
Community Advisor
Himanshu_JainCommunity AdvisorAccepted solution
Community Advisor
April 21, 2022

1.How can I sort the pages based on "date last updated"? That will help me prioritize which pages to review first.

 

In sites.html go to list view for sorting . 

 

Also to compare the page you can use ACS commons package /acs-commons/content/page-compare.html

 

 

Hope it helps.

 

Himanshu Jain