Bulk updating headings component in AEM | Community
Skip to main content
June 20, 2024
Solved

Bulk updating headings component in AEM

  • June 20, 2024
  • 4 replies
  • 775 views

in a page I need to find after title first heading . there is any way to get the report and update first heading only for all the pages . i am trying to get the report in crx/de by using heading type. But i get all heading in the page. 

 

Can anyone help me how to fix issue.

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 TarunKumar

HI @aneesshaik ,

Can you elaborate more on the ask, what you need? It seems like you want to update page title property, for that you can write a custom class which will update the node property.

Sample code that you can follow:

Node n = session.getNode("/content/project/home"); n.setProperty("PropertyName","Sample");

 

-Tarun

4 replies

h_kataria
Community Advisor
Community Advisor
June 20, 2024

Can you provide a screenshot of your content hierarchy which you are trying to update? 

TarunKumar
Community Advisor
TarunKumarCommunity AdvisorAccepted solution
Community Advisor
June 20, 2024

HI @aneesshaik ,

Can you elaborate more on the ask, what you need? It seems like you want to update page title property, for that you can write a custom class which will update the node property.

Sample code that you can follow:

Node n = session.getNode("/content/project/home"); n.setProperty("PropertyName","Sample");

 

-Tarun

aanchal-sikka
Community Advisor
Community Advisor
June 20, 2024

@aneesshaik 

 

How are you trying to update the heading of all the pages?

One option might be to use Groovy scripts. It will help you have better control, to traverse to the first title and update it. If the first title has the same path relative to the page, it would be even easier

Aanchal Sikka
kautuk_sahni
Community Manager
Community Manager
June 25, 2024

@aneesshaik Did you find the suggestion helpful? Please let us know if you require more information. Otherwise, please mark the answer as correct for posterity. If you've discovered a solution yourself, we would appreciate it if you could share it with the community. Thank you!  

Kautuk Sahni