Locate activated components of the Author side | Community
Skip to main content
Peter_Puzanovs
Community Advisor
Community Advisor
October 16, 2015
Solved

Locate activated components of the Author side

  • October 16, 2015
  • 2 replies
  • 1197 views

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

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 JustinEd3

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

2 replies

JustinEd3Adobe EmployeeAccepted solution
Adobe Employee
October 16, 2015

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

Sham_HC
Level 10
October 16, 2015