Programmatically create version for a page | Community
Skip to main content
Level 3
Jul 23, 2018 12:20 PM UTC
Solved

Programmatically create version for a page

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.
arunpatidar
arunpatidarAccepted solution
New Participant
Jul 23, 2018 12:41 PM UTC

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

4 replies

Level 3
Jul 25, 2018 7:26 AM UTC

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.

Translate
arunpatidar
New Participant
Jul 24, 2018 6:06 PM UTC

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

Translate
Arun Patidar
Level 3
Jul 24, 2018 2:45 PM UTC

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

Translate
arunpatidar
arunpatidarAccepted solution
New Participant
Jul 23, 2018 12:41 PM UTC

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

Translate
Arun Patidar