Expand my Community achievements bar.

SOLVED

Locate activated components of the Author side

Avatar

Community Advisor

Got an interesting requirement:

From the Author instance I need to find all /a/b/component's that have been replicated to the Publisher instance.

Background:

There are approximately 1000 components currently in the repo, of which 500 are published to the Publishers.

On the Author we want to retrieve all components, how can we effectively get the replication state of each component.

What is the most elegant approach to do it ?

CQ5.5

Thanks in advance for your awesome replies,

Peter

1 Accepted Solution

Avatar

Correct answer by
Employee

Hi Peter,

Do you literally mean "components" (e.g. /apps/geometrixx/components/title) or instances of a component (e.g. /content/geometrixx/en/products/jcr:content/title). If it the former, then the answer should be "all of them" as you should be deploying your codebase to both author and publish more or less simultaneously. If it is the latter, a query similar to /jcr:root/content//element(*, cq:PageContent)[@cq:lastReplicationAction='Activate']//element(*)[@sling:resourceType='geometrixx/components/title'] will show you the instances of a particular component which are on activated pages.

Regards,

Justin

View solution in original post

2 Replies

Avatar

Correct answer by
Employee

Hi Peter,

Do you literally mean "components" (e.g. /apps/geometrixx/components/title) or instances of a component (e.g. /content/geometrixx/en/products/jcr:content/title). If it the former, then the answer should be "all of them" as you should be deploying your codebase to both author and publish more or less simultaneously. If it is the latter, a query similar to /jcr:root/content//element(*, cq:PageContent)[@cq:lastReplicationAction='Activate']//element(*)[@sling:resourceType='geometrixx/components/title'] will show you the instances of a particular component which are on activated pages.

Regards,

Justin