Expand my Community achievements bar.

Applications for the 2024-2025 Adobe Experience Manager Champion Program are open!

Add a page property using curl command

Avatar

Level 8

Hi All,

I have a aem page(/content/xyz/page1) under page properties under advanced tab there is a searchable checkbox field, its unchecked, I want to make it as checked.

Vani1012_0-1685545234901.png

But in crxd I didnt see this property(searchable)

Vani1012_1-1685545318356.png

Vani1012_2-1685545347845.png

Actually I have so many pages and I need to update it to all page, I tried using curl command

curl -u admin:admin -Fsearchable="true" http://localhost:4502/content/xyz/page1

but its not updated, I didnt see that property in crxd.

Vani1012_3-1685545560704.png

 

Can anyone help me to fix this.

5 Replies

Avatar

Community Advisor

Hi @Vani1012 ,

You can achieve this using groovy script as well.

Please check similar thread here - https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/update-the-page-property-f...

Regards,

Shiv

Shiv Prakash

Avatar

Community Advisor

Doesn’t you need to update at jcr:content node as page property is stored at that level.

curl -u admin:admin -Fsearchable="true" http://localhost:4502/content/xyz/page1/jcr:content

 

Avatar

Level 8

@DPrakashRaj 
I want to add a new property for aem pages which uses a specific template.

Can you please share curl command for it

Avatar

Community Advisor

Hello @Vani1012 

Please visit https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/curl-command-to-set-proper...

 

It contains few examples.

 

In the example you have shared, the path is only till page. We cannot add properties there. It should be the location of exact node like http://localhost:4502/content/xyz/page1/jcr:content


Aanchal Sikka

Avatar

Community Advisor

@Vani1012 

please have a look at curl commands below.

https://experienceleague.adobe.com/docs/experience-manager-65/administering/operations/curl.html?lan...

https://github.com/paulrohrbeck/aem-links/blob/master/curl_cheatsheet.md

 

Other than that, you can use groovy script to fetch details of the page and making modifications afterwrds.

Here is the link for your reference.

https://aemgeeks.com/aem-tools/use-groovy-script-in-aem/

 

I hope it helps!