Expand my Community achievements bar.

Don’t miss the AEM Skill Exchange in SF on Nov 14—hear from industry leaders, learn best practices, and enhance your AEM strategy with practical tips.
SOLVED

Bulk updating headings component in AEM

Avatar

Level 1

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.

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

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

View solution in original post

4 Replies

Avatar

Community Advisor

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

Avatar

Correct answer by
Community Advisor

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

Avatar

Community Advisor

@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

Avatar

Administrator

@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