내 커뮤니티 업적 표시줄을 확대합니다.

Submissions are now open for the 2026 Adobe Experience Maker Awards.

Mark Solution

활동이 없어 이 대화는 잠겼습니다. 새 게시물을 작성해 주세요.

해결됨

Query for Activated pages with specific component

Avatar

Level 6

Hi,

We have a requirement to get list of activated pages with specific component in it.

I got the list of pages with that component by running a query, but unable to add the condition whether the page is activated or not.

So I have below query which is giving list of pages having the component.

 

path=/content
1_property=sling:resourceType
1_property.value=abc/components/content/htl/headline
p.limit=-1
orderby=path

 

But I have to accomodate below condition also,

 

2_property=@jcr:content/cq:lastReplicationAction
2_property.value=Activate

 

How We can do it.

 

List of pages with cq:lastReplicationAction = Activate and used headline component in it.

1 채택된 해결책 개

Avatar

정확한 답변 작성자:
Community Advisor

I could get below query closer to your requirement but its does not support finding component to n level. After getting the list of components ,you can write a logic to see if the page is Activated or not.

1_property=jcr:content/cq:lastReplicationAction
1_property.value=Activate
2_property=jcr:content/root/*/sling:resourceType
2_property.value=weretail/components/content/heroimage
path=/content/we-retail
type=cq:Page
p.limit=-1

원본 게시물의 솔루션 보기

2 답변 개

Avatar

Employee Advisor

Hi @akhilraj ,

 

PFB the query. I have verified and this works for me

path=/content
type=cq:Page
1_property.value=Activate
1_property=@jcr:content/cq:lastReplicationAction
2_property=jcr:content/root/container/*/@sling:resourceType
2_property.value=we-retail/components/banner
p.limit=-1

 

Hope this helps

 

Thanks

Avatar

정확한 답변 작성자:
Community Advisor

I could get below query closer to your requirement but its does not support finding component to n level. After getting the list of components ,you can write a logic to see if the page is Activated or not.

1_property=jcr:content/cq:lastReplicationAction
1_property.value=Activate
2_property=jcr:content/root/*/sling:resourceType
2_property.value=weretail/components/content/heroimage
path=/content/we-retail
type=cq:Page
p.limit=-1