Get List of locally created pages from local country site which are not rolled out from language-master | Community
Skip to main content
Level 2
November 4, 2024
Solved

Get List of locally created pages from local country site which are not rolled out from language-master

  • November 4, 2024
  • 3 replies
  • 1357 views

I have a MSM website, wherein I have a local country site under this path(/content/cognizant-dot-com/).

I want to list of locally created pages from "/content/cognizant-dot-com/ae/en", not coming from the master.

Can anyone share the Xpath query to review the results.

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 chavad

Hi,

If I want to apply one more property which is mentioned below in the same query then how to apply the and condition with not.

property=jcr:content/cq:lastReplicationAction
property.value=Activate

 


Hi @prachimathur 

You can group multiple properties like this and last line will help negate it

type=cq:PageContent path=/content/sherwin/tag/aem-main group.1_property=jcr:mixinTypes group.1_property.value=%cq:LiveRelationship% group.1_property.operation=like group.2_property=cq:lastReplicationAction group.2_property.value=Activate group.p.not=true

 

3 replies

chavad
Level 2
November 4, 2024

Hi @prachimathur 

You can try this SQL2 query using lastRolledout property. 

SELECT * FROM [nt:unstructured] AS s WHERE (ISDESCENDANTNODE([/content/*])) AND s.[sling:resourceType] = '<your page component resourceType' AND s.[cq:lastRolledout] IS NULL

 

replace your content node and resourceType accordingly

arunpatidar
Community Advisor
Community Advisor
November 4, 2024

Hi @prachimathur 
I am not sure if you can list down those pages with just query.

If you are using groovy then simply write a scipt to crawl all the pages within tree and check the reliationshipStatus.

Arun Patidar
Level 2
November 5, 2024

I'm using this query

/jcr:root/content/cognizant-dot-com//element(*, cq:Page)[jcr:content/jcr:mixinTypes and (not(jcr:like(jcr:content/jcr:mixinTypes, 'cq:LiveRelationship')))]  

but this give me result for all pages but I want for specific country

chavad
Level 2
November 5, 2024

Hi @prachimathur 

In your query replace '/content/cognizant-dot-com/' with your country specific  node path '/content/cognizant-dot-com/ae/en'.

 

If that doesn't work you can try this query -

/jcr:root/content/cognizant-dot-com/ae/en//element(*, cq:PageContent)
[
not(jcr:like(@jcr:mixinTypes, '%cq:LiveRelationship%'))
]

kautuk_sahni
Community Manager
Community Manager
November 5, 2024

@prachimathur Did you find the suggestions helpful? Please let us know if you require more information. Otherwise, please mark the answer as correct for posterity. If you've discovered a solution yourself, we would appreciate it if you could share it with the community. Thank you!

Kautuk Sahni