Expand my Community achievements bar.

SOLVED

How to find the atcivated version among all the version in RestoreVersion tab on sidekick?

Avatar

Level 4

Hi All,

I need to find the activated version among all the version available in sidekick.

My requirement is, I have to find the activated version and add the another field as status in sidekick and mark the status as new.

Could you please show me the right path how to achieve.

Thanks in Advance,

Mike

1 Accepted Solution

Avatar

Correct answer by
Level 8

I don't believe there is an easy way to determine the status you are looking for. The problem is that there isn't a single field that would indicate which version is the currently activated version. You looking for the version where cq:lastReplicated was changed - which means you have to looking back at previous version so you know it changed (i.e, version 3 is the version that is active - you would have to compare version 3 to version 2 so you knew cq:lastReplicated had changed). I don't know that there is a good query to determine this - the only option I can think of is to start at the head version and walk back until you find the version where cq:lastReplicated changed. 

View solution in original post

3 Replies

Avatar

Level 10

The sidekick displays information such as AEM componentsm etc. You can use the sidekick to activate pages:

http://docs.adobe.com/docs/en/cq/current/wcm/page_publish.html#Activating a Page from Sidekick

However - to locate existing activated content - you need to query the JCR and look for an activated version. Once you determine that - you can customize the sidekick. That is - you can customize the CQ sidekick to address your requirement of adding another field that shows status information. To customize the sidekick - see:

http://daycq.blogspot.ca/2012/05/hi-team-have-requirement-where-we-need.html

http://adobecms.blogspot.ca/2014/04/sidekick-customization.html

Avatar

Level 4

Hi,

Thanks for your reply.

How to "Query the JCR and look for an activated version"

i have tried with the following service "bin/wcm/versions.json?path=XXX".

but i couldn't found the difference between activated version and normal version.

In addition i tried with auditlog service too, but couldnt find the difference between activated version and normal version.

could you please help me how to proceed.

Thanks

Mike

Avatar

Correct answer by
Level 8

I don't believe there is an easy way to determine the status you are looking for. The problem is that there isn't a single field that would indicate which version is the currently activated version. You looking for the version where cq:lastReplicated was changed - which means you have to looking back at previous version so you know it changed (i.e, version 3 is the version that is active - you would have to compare version 3 to version 2 so you knew cq:lastReplicated had changed). I don't know that there is a good query to determine this - the only option I can think of is to start at the head version and walk back until you find the version where cq:lastReplicated changed.