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.
Solved! Go to Solution.
Views
Replies
Total Likes
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
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
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.
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
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%'))
]
Is there any way to use queryBuilder in this. Like how to apply this query in queryBuilder?
@prachimathur Somthing like this -
type=cq:PageContent
path=/content/cognizant-dot-com/ae/en
group.property=jcr:mixinTypes
group.property.value=%cq:LiveRelationship%
group.property.operation=like
group.p.not=true
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
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
Hi @prachimathur
You have to take care of broken live copy relationships yes well, so make sure either you exclude or include those based on your use case.
@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!
Views
Replies
Total Likes
Views
Likes
Replies