Expand my Community achievements bar.

Learn about Edge Delivery Services in upcoming GEM session
SOLVED

Programmatically create version for a page

Avatar

Level 4

I have requirement to create a version of a page by below points.

I have searched and found out that VersionManager can be helpful. But I did not find any property to set the value.

  • Version of the page has to be created with the following:
    • notes documentation
    • Initiator of the workflow
    • Approver of the workflow

Any thoughts how to proceed further.

Thanks

Kalyani

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

Hi,

You can check below

new Versions don't appear in Sidekick when created trhough VersionManager

As a version comment you can put all three details.

Thanks

Arun



Arun Patidar

View solution in original post

4 Replies

Avatar

Correct answer by
Community Advisor

Hi,

You can check below

new Versions don't appear in Sidekick when created trhough VersionManager

As a version comment you can put all three details.

Thanks

Arun



Arun Patidar

Avatar

Level 4

Hi Arun,

After following the link i was able to create a new version label. But when i tried to preview the content or compare with current from sites.html i am seeing a blank page

1534619_pastedImage_1.png

1534620_pastedImage_2.png

So how to proceed with this.

Thanks,

Kalyani

Avatar

Community Advisor

Hi Kalyani,

I tried creating page version with same. and I can see the both version.

Can you try to edit current version and then try to compare?

Screen Shot 2018-07-24 at 8.05.10 PM.png

aem63app-repo/CreateVersionPage.java at master · arunpatidar02/aem63app-repo · GitHub

Thanks

Arun



Arun Patidar

Avatar

Level 4

Thanks Arun,

I used to create the version by VersionManager. So was not able to compare it. But by using PageManager able to see the differences.