Hello,
We have a need to add meta tags in bulk to many of our pages in AEM (normally adding through Page Properties -> Meta Tag). I was wondering if there is a way to automate this/do it in bulk, either through cURL or other means?
Thanks,
Kelly
Solved! Go to Solution.
Views
Replies
Total Likes
Hi @KMarchewa, here are few options, I hope you will find something that will suits you.
check this groovy script point #2
ref:- https://labs.tadigital.com/index.php/2018/12/18/groovy-script-in-aem/
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | def path = "/content/we-retail/us/en/user/account/order-history"; def propName = "testPropName"; def propValue = "testPropValue"; getPage(path).recurse { page \-> def jcrContentNode = page.node; if (jcrContentNode.hasProperty(propName)) { def oldPropValue = jcrContentNode.getProperty(propName).getString(); if(!oldPropValue.equals(propValue)) { jcrContentNode.setProperty(propName, propValue); } } else { jcrContentNode.setProperty(propName, propValue); } } save(); |
Thanks much for the quick response. Unfortunately, I cannot install the Groovy Console package in AEM. Is there a good alternative that does not require in new packages in AEM itself?
Thanks!
Hi @KMarchewa, here are few options, I hope you will find something that will suits you.
You can write the same code @Varun_Shakya mentioned in a servlet and push it through the code.
Views
Likes
Replies