Need to copy blueprint programmatically and modify properties value... | Community
Skip to main content
Level 2
October 16, 2015
Solved

Need to copy blueprint programmatically and modify properties value...

  • October 16, 2015
  • 4 replies
  • 1881 views

Hello, I am looking forward to copy and modify node / property values via sling post. I am not sure which path to take. What I need to copy blueprint programmatically and modify property values. I have gone through the sling manipulating content. Please do share if any good example.

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 Lokesh_Shivalingaiah

See if this example helps you

http://www.albinsblog.com/2014/12/programmatically-create-page-in-cq5.html#.VgGeyN9Viko

4 replies

Lokesh_Shivalingaiah
Level 10
October 16, 2015

When you say copy blueprint and change the property value, can you let us know your use case ?

Are you trying to create live copy programmatically ?? Usually Blueprint will be created so that the business authors can use the same while creating new sites.

Level 2
October 16, 2015
Not live copy. Second trying to attempt to create programmatically to create new site. I know page manager class with sling post is the answer however was looking if anyone has done to share learning example would help to reach faster. Thanks.
kautuk_sahni
Community Manager
Community Manager
October 16, 2015

Hi 

Your can go through this article :- https://helpx.adobe.com/experience-manager/using/custom-sling-servlets.html

In this article we are taking form values and sending them via AJAX post request and creating node corresponding to them.

I hope this would help you.

 

Else

 

you can create OSGi service and can modify node accordingly Link:- https://helpx.adobe.com/experience-manager/using/programmatically-accessing-cq-content-using.html

I hope this would help you.

 

Thanks and Regards

Kautuk Sahni

Kautuk Sahni
Lokesh_Shivalingaiah
Lokesh_ShivalingaiahAccepted solution
Level 10
October 16, 2015