I'm using AEM 6.5.11. Can someone help me with a XPATH query that could give me the list of pages which has the particular property inside a particular node.
Below are details;
Page node: /content/sample-bank/personal/form
Type: cq:Page
property name: eventscript
property type: String
Please find the below screenshot - I want to get the list of pages under content path /content/sample-bank/personal/form, eventscript is one of the property in container node as shown below.
Note: There are 1000 of subpages under the cq:Page /content/sample-bank/personal/form which could have or don't have the property eventscript in the node /jcr:content/content/container
Kindly help. Thanks in advance.
Thanks
SHYAMSUNDAR TK
Solved! Go to Solution.
Topics help categorize Community content and increase your ability to discover relevant content.
Views
Replies
Total Likes
I tried the similar sample query in we.retail also, its working for me.
type=cq:Page
path=/content/we-retail/us/en/products/men
property=@jcr:content/image/fileReference
property.operation=exists
p.hits=full
p.limit=-1
Hi @samsundar23
Could you please try this below query in debugger and see if brings the results.
type=cq:Page
path=/content/sample-bank/personal/form
property=@jcr:content/content/container/eventscript
property.operation=exists
p.hits=full
p.limit=-1
@Saravanan_Dharmaraj - This is not giving me the list of pages bro. Basically, eventscript is available as one of the property in the container node as shown below.
I tried the similar sample query in we.retail also, its working for me.
type=cq:Page
path=/content/we-retail/us/en/products/men
property=@jcr:content/image/fileReference
property.operation=exists
p.hits=full
p.limit=-1
Could you please one of the query below and let me know if it works -
Option:1
path=/content/we-retail/language-masters/en
type=cq:Page
property=jcr:content/content/container/eventscript
property.operation=exists
p.limit=-1
XPath query
/jcr:root/content/we-retail/language-masters/en//element(*, cq:Page)
[
(jcr:content/content/container/@eventscript)
]
Option2:
path=/content/we-retail/language-masters/en
nodename=container
property=eventscript
property.operation=exists
p.limit=-1
XPath query
/jcr:root/content/we-retail/language-masters/en//*
[
(fn:name() = 'container' and @eventscript)
]
Regards,
Debal
Views
Likes
Replies