How to reference parent or ancestor's property in query builder | Community
Skip to main content
kai6novice
Level 2
June 30, 2016

How to reference parent or ancestor's property in query builder

  • June 30, 2016
  • 1 reply
  • 1656 views

In Query Builder, you can refer to a node's child's property via */@jcr:title or its descendant's property via */*/@jcr:title.

So you can create a search for a node, where the node has a given property and its child has a given property

Ex:

type=cq:Page

property=*/@jcr:title

value=Great Title

This will return the cq:Page node, where it's child node's jcr:title equal to Great Title

However, I am looking for a way to refer to parent's property or ancestor's property. How do I do that? and can I refer to parent node in fulltext.relPath?

I tried the following

type=cq:PageContent

property=../@jcr:title

value=Great Title

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.

1 reply

Level 2
September 27, 2021

I have this question as well.