Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

Adobe Summit 2023 [19th to 23rd March, Las Vegas and Virtual] | Complete AEM Session & Lab list
SOLVED

Fetch page properties and update in excell

Avatar

Level 4

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

 

1 Accepted Solution

Avatar

Correct answer by
Level 2

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

View solution in original post

7 Replies

Avatar

Community Advisor

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

 

Avatar

Correct answer by
Level 2

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

Avatar

Level 4

Hi @Gaurav_Sachdeva1 

 

@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. 

Avatar

Community Advisor

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.

 

Avatar

Level 4

Hi @DEBAL_DAS @Gaurav_Sachdeva1 

 

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. 

Avatar

Community Advisor

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.

Avatar

Level 2

Hi @Ricky99999 

 

you can customize the page report and change the complete report according to your requirement just go here and try.

 

Gaurav_Sachdeva1_0-1675272138530.png

 

Thanks,

Gaurav

 

The ultimate experience is back.

Join us in Vegas to build skills, learn from the world's top brands, and be inspired.

Register Now