Programmatically create version for a page | Community
Skip to main content
Level 3
July 23, 2018
Solved

Programmatically create version for a page

  • July 23, 2018
  • 4 replies
  • 2547 views

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

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 arunpatidar

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

4 replies

arunpatidar
Community Advisor
arunpatidarCommunity AdvisorAccepted solution
Community Advisor
July 23, 2018

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
Level 3
July 24, 2018

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

So how to proceed with this.

Thanks,

Kalyani

arunpatidar
Community Advisor
Community Advisor
July 24, 2018

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?

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

Thanks

Arun

Arun Patidar
Level 3
July 25, 2018

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.