Fetch page properties and update in excell | Community
Skip to main content
Ricky99999
Level 4
January 31, 2023
Solved

Fetch page properties and update in excell

  • January 31, 2023
  • 3 replies
  • 1898 views

Hi,

 

I got a requirement to list of below properties from page and update them in excell

1.tags

2. title

3. page title

4. Publish status

5. Description

 

I have thousands of pages, and child pages too , how can I a give this.

 

Thanks in advance

 

Thanks

 

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 Gaurav_Sachdeva_

Hi @ricky99999 

 

There is an ACS common tool to fetch page report which gives page details under specific path, have a look at https://adobe-consulting-services.github.io/acs-aem-commons/features/report-builder/index.html

Hope this helps!!

 

Thanks,

Gaurav Sachdeva

3 replies

Kiran_Vedantam
Community Advisor
Community Advisor
January 31, 2023

Hi @ricky99999 

 

You can achieve your use case in the below ways:

  1. use query builder API to get the properties you want
  2. use page or node API and getting the value map of the resource

and finally write them into an excel file in java

 

Query builder sample query:

path=/content/we-retail
type=cq:Page
path=/content/we-retail
type=cq:Page
group.1_property=jcr:content/cq:productMaster
group.1_property.value=
/var/commerce/products/we-retail/wo/pants/faba_running_pants
group.2_property=jcr:content/cq:template
group.2_property.value=
/conf/we-retail/settings/wcm/templates/product-page
p.limit=-1
 
Node or Page API:
Once you get the page resource, iterate it and adapt it to Node or Page API
final resourceresolver resolver = request.getresourceresolver();
final resource res = resolver.getresource(page_path);
Page:
final page requestedpage =res.adaptto(page.class);
Node:
final Node requestedNode =res.adaptto(node.class);
 

Hope it helps!

Thanks,
Kiran Vedantam

 
Gaurav_Sachdeva_
Gaurav_Sachdeva_Accepted solution
Level 3
January 31, 2023

Hi @ricky99999 

 

There is an ACS common tool to fetch page report which gives page details under specific path, have a look at https://adobe-consulting-services.github.io/acs-aem-commons/features/report-builder/index.html

Hope this helps!!

 

Thanks,

Gaurav Sachdeva

Ricky99999
Level 4
February 1, 2023

Hi @gaurav_sachdeva_ 

 

@Thanks for the reply.

By using ACS commons I can get title, tags and replication status and I believe they are default properties. Correct me.

Do we have any way to get customised page properties in Excell. 

DEBAL_DAS
February 1, 2023

If you are allowed to use ACS AEM Commons in your project, then you can use page report mechanism for this requirement.

 

1. Please refer existing ACS AEM Commons page report here https://adobe-consulting-services.github.io/acs-aem-commons/features/report-builder/index.html

2. Create another page report as per your need.

ACS AEM Commons page report will save your time and effort.

 

Ricky99999
Level 4
February 1, 2023

Hi @debal_das @gaurav_sachdeva_ 

 

Thanks for the reply.

By using ACS commons I got title, tags and replication status and I believe they are default properties. Correct me.

Do we have any way to get customised page properties in Excell. 

DEBAL_DAS
February 1, 2023

Yes, I used ACS commons with customized page property also and it worked.

 

In result column you need to mention this (giving example) -

Heading

Field Label [Some meaningful name] of custom property

Property

jcr:content/cutomproperty

 

Hope this helps.