Expand my Community achievements bar.

SOLVED

Publish / unpublish History

Avatar

Level 2

Hi

 

Is there any way of checking if a page was unpublished before it was published?
Want to check when (Date) it got published and when (Date) it got unpublished and User who published & unpublished

Thanks in Advance !!!

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

Hi @Sigkumar ,

You can use ReplicationStatus to get the deactivated/unpublished status of the page:

 

ReplicationStatus status = page.adaptTo(ReplicationStatus.class);
boolean deactivatedStatus = status.isDeactivated();

 You can also check the activated/published status below:

boolean activatedStatus = status.isActivated();

Hope this could help you

Thanks

Shiv 

Shiv Prakash

View solution in original post

3 Replies

Avatar

Community Advisor

Avatar

Level 2

Is there any other way as i am not finding that /etc/acs-commons/audit-log-search.html  path in that

 

Sigkumar_0-1666164530510.png

 

Avatar

Correct answer by
Community Advisor

Hi @Sigkumar ,

You can use ReplicationStatus to get the deactivated/unpublished status of the page:

 

ReplicationStatus status = page.adaptTo(ReplicationStatus.class);
boolean deactivatedStatus = status.isDeactivated();

 You can also check the activated/published status below:

boolean activatedStatus = status.isActivated();

Hope this could help you

Thanks

Shiv 

Shiv Prakash